HTML — iframe, embed, object 要素, 他

【この訳に特有な表記規約】

◎表記記号

4.8.5. `iframe^e 要素

`分類$
`~flow内容$/`句ng内容$/`埋込d内容$/`対話的~内容$/`可触~内容$ ◎ Flow content. ◎ Phrasing content. ◎ Embedded content. ◎ Interactive content. ◎ Palpable content.
`この要素を利用できる文脈$
`埋込d内容$が期待される所。 ◎ Where embedded content is expected.
`内容~model$
`なし$ ◎ Nothing.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`src$aF — 埋込む資源の~address ◎ src — Address of the resource
`srcdoc$aF — `iframe$e 内に具現化する文書 ◎ srcdoc — A document to render in the iframe
`name$aF — `内容~navigable$の名前 ◎ name — Name of content navigable
`sandbox$aF — 入子な内容に対する~security規則 ◎ sandbox — Security rules for nested content
`allow$aF — `iframe$e の内容に適用されることになる`許可~施策$ ◎ allow — Permissions policy to be applied to the iframe's contents
`allowfullscreen$aF — `iframe$e の内容が `requestFullscreen()$m を利用するのを許容するかどうか ◎ allowfullscreen — Whether to allow the iframe's contents to use requestFullscreen()
`width$a — 横~寸法 ◎ width — Horizontal dimension
`height$a — 縦~寸法 ◎ height — Vertical dimension
`referrerpolicy$aF — この要素により起動された`~fetch$用の`~referrer施策$ ◎ referrerpolicy — Referrer policy for fetches initiated by the element
`loading$aF — 読み込みの先送り可否を決定するときに利用される。 ◎ loading — Used when determining loading deferral
`~accessibilityの考慮点$
`iframe$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLIFrameElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute USVString `src$mF;
  [`CEReactions$] attribute `HTMLString$ `srcdoc$mF;
  [`CEReactions$] attribute DOMString `name$mF;
  [SameObject, PutForwards=`value$m] readonly attribute `DOMTokenList$I `sandbox$mF;
  [`CEReactions$] attribute DOMString `allow$mF;
  [`CEReactions$] attribute boolean `allowFullscreen$mF;
  [`CEReactions$] attribute DOMString `width$m;
  [`CEReactions$] attribute DOMString `height$m;
  [`CEReactions$] attribute DOMString `referrerPolicy$mF;
  [`CEReactions$] attribute DOMString `loading$mF;
  readonly attribute `Document$I? `contentDocument$mF;
  readonly attribute `WindowProxy$I? `contentWindow$mF;
  `Document$I? `getSVGDocument$m();

  // `HTMLIFrameElement$obsMb
};

`iframe$e 要素は、 自身の`内容~navigable$を`表現-$する。 ◎ The iframe element represents its content navigable.

`src@aF 属性は、 要素の`内容~navigable$が包含することになる~pageの`~URL$を与える。 この属性が在る場合の値は、 `前後~空白~可の妥当かつ空でない~URL$でなければナラナイ。 `iframe$e 要素が `itemprop$a 属性を有する場合、 この属性も有していなければナラナイ。 ◎ The src attribute gives the URL of a page that the element's content navigable is to contain. The attribute, if present, must be a valid non-empty URL potentially surrounded by spaces. If the itemprop attribute is specified on an iframe element, then the src attribute must also be specified.

`srcdoc@aF 属性は、 要素の`内容~navigable$が包含することになる内容を与える。 この属性の値は、 `~iframe-srcdoc文書$を`構築する@~HTMLnav#create-navigation-params-from-a-srcdoc-resource$ときに利用される。 ◎ The srcdoc attribute gives the content of the page that the element's content navigable is to contain. The value of the attribute is used to construct\

`~iframe-srcdoc文書@ とは、 次を満たす`文書$である ⇒ その`~URL$docは,`~about_srcdoc に合致して$いる ◎ an iframe srcdoc document, which is a Document whose URL matches about:srcdoc.

【 そのような文書は、 `srcdoc$aF 以外からも`作成され得る@~HTMLissue/9514$。 】

`srcdoc$aF 属性に指定する値は、 次に与える順による構文-成分からなる`~HTML構文$を利用しなければナラナイ: ◎ The srcdoc attribute, if present, must have a value using the HTML syntax that consists of the following syntactic components, in the given order:

  1. 0 個~以上の[ `~comment$syn, `~ASCII空白$ ] ◎ Any number of comments and ASCII whitespace.
  2. 0 〜 1 個の `~DOCTYPE$ ◎ Optionally, a DOCTYPE.
  3. 0 個~以上の[ `~comment$syn, `~ASCII空白$ ] ◎ Any number of comments and ASCII whitespace.
  4. `html$e `要素$synの形で与えられる`文書~要素$ ◎ The document element, in the form of an html element.
  5. 0 個~以上の[ `~comment$syn, `~ASCII空白$ ] ◎ Any number of comments and ASCII whitespace.

注記: 上の要件は、 `~XML文書$にも適用される。 ◎ The above requirements apply in XML documents as well.

次の~blogでは、 `srcdoc$aF, 下に述べる `sandbox$aF 両~属性を併用して,この特能を~supportする~UAの利用者に[ ~blog投稿~commentによる~script注入から保護する~~追加の層 ]を伴わせて供している: ◎ Here a blog uses the srcdoc attribute in conjunction with the sandbox attribute described below to provide users of user agents that support this feature with an extra layer of protection from script injection in the blog post comments:

`iframe-1^xCode

引用符は~escapeされる必要があることに加え (さもなければ, `srcdoc$aF 属性は そこで終端してしまう)、 ~sandbox化された内容(例:~URLや注釈文~内)における生の~ampersand( `&^l )は,二重に~escapeされる必要があることにも注意 — `srcdoc$aF 属性が初めに構文解析されるときに ~ampersandが保全され,その後 ~sandbox化された内容がまた構文解析されるときにも ~ampersandが誤解釈されるのを防ぐため。 ◎ Notice the way that quotes have to be escaped (otherwise the srcdoc attribute would end prematurely), and the way raw ampersands (e.g. in URLs or in prose) mentioned in the sandboxed content have to be doubly escaped — once so that the ampersand is preserved when originally parsing the srcdoc attribute, and once more to prevent the ampersand from being misinterpreted when parsing the sandboxed content.

更には, `srcdoc$aF 属性~内の~markupは、 文書~全体を表現しているにもかかわらず,~~比較的 簡素にできることにも注意 — [ `html$e, `head$e, `body$e ]要素の`開始~tag/終了~tagは省略可能@~HTMLwriting#syntax-tag-omission$であり (省略されても,依然として暗黙に在る), `~iframe-srcdoc文書$においては[ `~DOCTYPE$ / `title$e 要素 ]も省略可能なので、 構文~内に~literalに現れる必要があるのは, `body$e 要素の内容のみになるので。 ◎ Furthermore, notice that since the DOCTYPE is optional in iframe srcdoc documents, and the html, head, and body elements have optional start and end tags, and the title element is also optional in iframe srcdoc documents, the markup in a srcdoc attribute can be relatively succinct despite representing an entire document, since only the contents of the body element need appear literally in the syntax. The other elements are still present, but only by implication.

注記: `~HTML構文$においては、 作者が覚えておく必要があるのは,次の点に限られる:

  • 文字 `0022^U `"^smb を利用して,属性の内容を包装する。
  • 次に、 文字 `0026^U `&^smb をすべて~escapeしてから,文字 `0022^U `"^smb をすべて~escapeする (逆順に行うと、 引用符は二重に~escapeされ, `"^l から `"^l になってしまう)。
  • `sandbox$aF 属性を指定して、 内容の安全な埋込みを確保する。
◎ In the HTML syntax, authors need only remember to use U+0022 QUOTATION MARK characters (") to wrap the attribute contents and then to escape all U+0026 AMPERSAND (&) and U+0022 QUOTATION MARK (") characters, and to specify the sandbox attribute, to ensure safe embedding of content. (And remember to escape ampersands before quotation marks, to ensure quotation marks become " and not ".)

注記: ~XMLにおいては、 `属性~値の正規化$を防止するため, `003C^U `<^smb も~escapeされる必要がある。 ~XMLの一部の空白~文字, — 特定的には `0009^U CHARACTER TABULATION( tab ), `000A^U LINE FEED( LF ), `000D^U CARRIAGE RETURN( CR ) — も~escapeされる必要がある。 `XML$r ◎ In XML the U+003C LESS-THAN SIGN character (<) needs to be escaped as well. In order to prevent attribute-value normalization, some of XML's whitespace characters — specifically U+0009 CHARACTER TABULATION (tab), U+000A LINE FEED (LF), and U+000D CARRIAGE RETURN (CR) — also need to be escaped. [XML]

注記: `src$aF, `srcdoc$aF 両~属性とも指定された場合、 `srcdoc$aF 属性が優先される。 これにより,作者は、 `srcdoc$aF 属性を~supportしない旧来の~UA用に~fallback `~URL$を供せるようになる。 ◎ If the src attribute and the srcdoc attribute are both specified together, the srcdoc attribute takes priority. This allows authors to provide a fallback URL for legacy user agents that do not support the srcdoc attribute.


`iframe$e 用の`~HTML要素~挿入-時の手続き$は、 所与の ( %挿入される~node ) に対し: ◎ The iframe HTML element insertion steps, given insertedNode, are:

  1. ~IF[ %挿入される~node の`~shadowも含めた根$が`属する閲覧~文脈$ ~EQ ~NULL ] ⇒ ~RET ◎ If insertedNode's shadow-including root's browsing context is null, then return.
  2. `新たな子~navigableを作成する$( %挿入される~node ) ◎ Create a new child navigable for insertedNode.
  3. ~IF[ %挿入される~node は `sandbox$aF 属性を有する ] ⇒ `~sandbox法~指令を構文解析する$( %挿入される~node の `sandbox$aF 属性の値, %挿入される~node の`~iframe~sandbox法~flag集合$ ) ◎ If insertedNode has a sandbox attribute, then parse the sandboxing directive given the attribute's value and insertedNode's iframe sandboxing flag set.
  4. `~iframe属性~群を処理する$( %挿入される~node, `初回$i ) ◎ Process the iframe attributes for insertedNode, with initialInsertion set to true.

`iframe$e 用の`~HTML要素~除去-時の手続き$は、 所与の ( %除去される~node ) に対し ⇒ `子~navigableを破壊する$( %除去される~node ) ◎ The iframe HTML element removing steps, given removedNode, are to destroy a child navigable given removedNode.

注記: これが起きたときは、 `unload$et ~eventは発火されない (当の要素の`内容~文書$は、 `~unloadされる@~HTMLlifecycle#unload-a-document$ことなく, `破壊される@~HTMLds#destroy-a-document$【!~HTMLds#destroy-a-child-navigable】 )。 ◎ This happens without any unload events firing (the element's content document is destroyed, not unloaded).

上により, `iframe$e は`~shadow~tree$内にある間も処理されるが、 その挙動を成す他のいくつかの側面は, ~shadow~treeに関してきちんと定義されていない。 より詳細は、 `課題 #763@~HTMLissue/763$ を見よ。 ◎ Although iframes are processed while in a shadow tree, per the above, several other aspects of their behavior are not well-defined with regards to shadow trees. See issue #763 for more detail.

[ `iframe$e 要素 %iframe の`内容~navigable$ ~NEQ ~NULL ]の下では、 ~UAは,次に従うモノトスル: ◎ ↓

  • %iframe の `srcdoc$aF 属性が[ 設定- / 変更- / 除去- ]されたときは ⇒ `~iframe属性~群を処理する$( %iframe ) ◎ Whenever an iframe element with a non-null content navigable has its srcdoc attribute set, changed, or removed, the user agent must process the iframe attributes.
  • %iframe の `src$aF 属性が[ 設定- / 変更- / 除去- ]されたときは ⇒ ~IF[ %iframe は `srcdoc$aF 属性を有していない ] ⇒ `~iframe属性~群を処理する$( %iframe ) ◎ Similarly, whenever an iframe element with a non-null content navigable but with no srcdoc attribute specified has its src attribute set, changed, or removed, the user agent must process the iframe attributes.

`~iframe属性~群を処理する@ ときは、 所与の ( `iframe$e 要素 %iframe, %初回か ~IN { `初回@i, ε }(省略時は ε ) ) に対し,次を走らすモノトスル: ◎ To process the iframe attributes for an element element, with an optional boolean initialInsertion (default false):

  1. ~IF[ %iframe は `srcdoc$aF 属性を有する ]: ◎ If element's srcdoc attribute is specified, then:

    1. %iframe の`現在の~naviは~lazyに読込まれるか$ ~SET ~F ◎ Set element's current navigation was lazy loaded boolean to false.
    2. ~IF[ `~lazyに読込むことになる$( %iframe ) ~EQ ~T ]: ◎ If the will lazy load element steps given element return true, then:

      1. %iframe の`~lazy読込n再開~手続き$ ~SET この~algoの `srcdoc 資源へ~navigateする^i 段~以降を走らす手続き ◎ Set element's lazy load resumption steps to the rest of this algorithm starting with the step labeled navigate to the srcdoc resource.
      2. %iframe の`現在の~naviは~lazyに読込まれるか$ ~SET ~T ◎ Set element's current navigation was lazy loaded boolean to true.
      3. `~lazyに読込んでいる要素の交差~観測を開始する$( %iframe ) ◎ Start intersection-observing a lazy loading element for element.
      4. ~RET ◎ Return.
    3. `srcdoc 資源へ~navigateする^i:

      1. `~iframeを~navigateする$( %iframe, `~about_srcdoc$sc, 空~文字列, %iframe の `srcdoc$aF 属性の値 )
      2. ~RET
      ◎ Navigate to the srcdoc resource: navigate an iframe or frame given element, about:srcdoc, the empty string, and the value of element's srcdoc attribute.

      この段による結果の`文書$は、 `~iframe-srcdoc文書$と見なすモノトスル。 ◎ The resulting Document must be considered an iframe srcdoc document.

  2. ~ELSE: ◎ Otherwise:

    1. %~URL ~LET `~iframe~src属性を処理する$( %iframe, %初回か ) ◎ Let url be the result of running the shared attribute processing steps for iframe and frame elements given element and initialInsertion.
    2. ~IF[ %~URL ~EQ ~NULL ] ⇒ ~RET ◎ If url is null, then return.
    3. ~IF[ %~URL は`~about_blank に合致して$いる ]~AND[ %初回か ~EQ `初回$i ]: ◎ If url matches about:blank and initialInsertion is true, then:

      1. `~iframe~load~event手続き$( %iframe ) ◎ Run the iframe load event steps given element.
      2. ~RET ◎ Return.
    4. %~referrer施策 ~LET %iframe の `referrerpolicy$aF 内容~属性の現在の状態 ◎ Let referrerPolicy be the current state of element's referrerpolicy content attribute.
    5. %iframe の`現在の~naviは~lazyに読込まれるか$ ~SET ~F ◎ Set element's current navigation was lazy loaded boolean to false.
    6. ~IF[ `~lazyに読込むことになる$( %iframe ) ~EQ ~T ]: ◎ If the will lazy load element steps given element return true, then:

      1. %iframe の`~lazy読込n再開~手続き$ ~SET この~algoの `~navigateする^i 段~以降を走らす手続き ◎ Set element's lazy load resumption steps to the rest of this algorithm starting with the step labeled navigate.
      2. %iframe の`現在の~naviは~lazyに読込まれるか$ ~SET ~T ◎ Set element's current navigation was lazy loaded boolean to true.
      3. `~lazyに読込んでいる要素の交差~観測を開始する$( %iframe ) ◎ Start intersection-observing a lazy loading element for element.
      4. ~RET ◎ Return.
    7. `~navigateする^i ⇒ `~iframeを~navigateする$( %iframe, %~URL, %~referrer施策 ) ◎ Navigate: navigate an iframe or frame given element, url, and referrerPolicy.

【 以下に与える[ `~iframe~src属性を処理する$, `~iframeを~navigateする$ ]手続きは、 実際には `frame$e 要素からも利用される — 原文では,そのことも表すよう もっと長い名前が与えられているが、 この訳では,命名を簡素化する (廃用にされた `frame^e 要素を和訳するつもりはないので)。 】

`~iframe~src属性を処理する@ ときは、 所与の ( %iframe, %初回か ) に対し: ◎ The shared attribute processing steps for iframe and frame elements, given an element element and a boolean initialInsertion, are:

  1. %~URL ~LET `~URL~record$ `~about_blank$sc ◎ Let url be the URL record about:blank.
  2. ~IF[ %iframe は `src$aF 属性を有していて,その値 %src ~NEQ 空~文字列 ]: ◎ If element has a src attribute specified, and its value is not the empty string, then:

    1. %src ~SET `~URLを符号化法の下で相対的に構文解析する$( %src, %iframe の`~node文書$ ) ◎ Let maybeURL be the result of encoding-parsing a URL given that attribute's value, relative to element's node document.
    2. ~IF[ %src ~NEQ `失敗^i ] ⇒ %~URL ~SET %src ◎ If maybeURL is not failure, then set url to maybeURL.
  3. %iframe の`~node~navigable$の`広義-先祖~navigable群$を成す ~EACH( %~navigable ) に対し ⇒ ~IF[ ( %~navigable にて`作動中な文書$navの`~URL$doc, %~URL ) は,`素片は除外する^i 下で`同等な~URL$である ] ⇒ ~RET ~NULL ◎ If the inclusive ancestor navigables of element's node navigable contains a navigable whose active document's URL equals url with exclude fragments set to true, then return null.
  4. ~IF[ %~URL は`~about_blank に合致して$いる ]~AND[ %初回か ~EQ `初回$i ] ⇒ `~URLと履歴を更新する$( %iframe の`内容~navigable$にて`作動中な文書$nav, %~URL ) ◎ If url matches about:blank and initialInsertion is true, then perform the URL and history update steps given element's content navigable's active document and url.

    注記: この段は、 %~URL が `about:blank?foo^l の様な何かである事例で必要yある。 %~URL は単に素な `~about_blank^sc の場合、 この段は何もしない。 ◎ This is necessary in case url is something like about:blank?foo. If url is just plain about:blank, this will do nothing.

  5. ~RET %~URL ◎ Return url.

`~iframeを~navigateする@ ときは、 所与の ( %iframe, `~URL$ %~URL, `~referrer施策$ %~referrer施策, [ 文字列/~NULL ] %~srcdoc文字列(省略時は NULL ) ) に対し: ◎ To navigate an iframe or frame given an element element, a URL url, a referrer policy referrerPolicy, and an optional string-or-null srcdocString (default null):

  1. %履歴~取扱い ~LET `auto$hH ◎ Let historyHandling be "auto".
  2. %~navigable ~LET %iframe の`内容~navigable$ ◎ ↓
  3. ~IF[ %~navigable にて`作動中な文書$navは`完全に読込まれ$ていない ] ⇒ %履歴~取扱い ~SET `replace$hH ◎ If element's content navigable's active document is not completely loaded, then set historyHandling to "replace".
  4. ~IF[ %iframe は `iframe$e である ] ⇒ %iframe の`処理待ちな資源~計時の開始~時刻$ ~SET `現在の高分解能~時刻$( %iframe の`~node文書$に`関連な大域~obj$ ) ◎ If element is an iframe, then set element's pending resource-timing start time to the current high resolution time given element's node document's relevant global object.
  5. `~navigableを~URLへ~navigateする$( %~navigable, %~URL, %iframe の`~node文書$ ) — 次も与える下で ⇒# `履歴~取扱い^i ~SET %履歴~取扱い, `~referrer施策^i ~SET %~referrer施策, `文書~資源^i ~SET %~srcdoc文字列 ◎ Navigate element's content navigable to url using element's node document, with historyHandling set to historyHandling, referrerPolicy set to referrerPolicy, and documentResource set to scrdocString.

注記: `iframe$e 要素の作成-時には、 その中へ読込まれる他の~dataは無い場合には, 要素に向けて `load$et ~eventも発火される。 ◎ A load event is also fired at the iframe element when it is created if no other data is loaded in it.

各 `文書$は、 真偽値をとる `~iframe~loadは進捗-中か@, `~iframe~loadを黙らすか@ を持つ — いずれも,`文書$の作成-時には ~F になるモノトスル。 ◎ Each Document has an iframe load in progress flag and a mute iframe load flag. When a Document is created, these flags must be unset for that Document.

`~iframe~load~event手続き@ は、 所与の ( `iframe$e 要素 %iframe ) に対し,次を走らす: ◎ To run the iframe load event steps, given an iframe element element:

  1. %~navigable ~LET %iframe の`内容~navigable$ ◎ ↓
  2. ~Assert: %~navigable ~NEQ ~NULL ◎ Assert: element's content navigable is not null.
  3. %子~文書 ~LET %~navigable にて`作動中な文書$nav ◎ Let childDocument be element's content navigable's active document.
  4. ~IF[ %子~文書 の`~iframe~loadを黙らすか$ ~EQ ~T ] ⇒ ~RET ◎ If childDocument has its mute iframe load flag set, then return.
  5. ~IF[ %iframe の`処理待ちな資源~計時の開始~時刻$ ~NEQ ~NULL ]: ◎ If element's pending resource-timing start time is not null, then:

    1. %大域~obj ~LET %iframe の`~node文書$に`関連な大域~obj$ ◎ Let global be element's node document's relevant global object.
    2. %~fallback計時~報 ~LET 新たな`~fetch計時~報$ — その ⇒# `開始~時刻$fT ~SET %iframe の`処理待ちな資源~計時の開始~時刻$, `終了~時刻$fT ~SET `現在の高分解能~時刻$( %大域~obj ) ◎ Let fallbackTimingInfo be a new fetch timing info whose start time is element's pending resource-timing start time and whose response end time is the current high resolution time given global.
    3. `資源~計時を~markする$( ↓ ) ⇒# %~fallback計時~報, %~URL, "`iframe$e", %大域~obj, 空~文字列, 新たな`応答~本体~報$, 0 ◎ Mark resource timing given fallbackTimingInfo, url, "iframe", global, the empty string, a new response body info, and 0.
    4. %iframe の`処理待ちな資源~計時の開始~時刻$ ~SET ~NULL ◎ Set element's pending resource-timing start time to null.
  6. %子~文書 の`~iframe~loadは進捗-中か$ ~SET ~T ◎ Set childDocument's iframe load in progress flag.
  7. `~eventを発火する$( %iframe, `load$et ) ◎ Fire an event named load at element.
  8. %子~文書 の`~iframe~loadは進捗-中か$ ~SET ~F ◎ Unset childDocument's iframe load in progress flag.

これを~scriptingと併用すれば、 局所~networkの~HTTP~serverの~URL空間を探査する攻撃にも利用できる。 ~UAは、 これを軽減するため,上に述べたものより厳密な[ `非同一-生成元$に対する~access制御~用の施策 ]を実装してもヨイ — が,あいにく そのような施策は、 概して,既存の~web内容と互換にならない。 ◎ This, in conjunction with scripting, can be used to probe the URL space of the local network's HTTP servers. User agents may implement cross-origin access control policies that are stricter than those described above to mitigate this attack, but unfortunately such policies are typically not compatible with existing web content.

所与の要素~型が `~load~eventを遅延し得る@ ならば、 ~UAは,そのような要素~型の各 %要素 に対し、[ %要素 の`内容~navigable$ %~navigable が ~OR↓ を満たしている ]間は, %要素 の`~node文書$の`~load~eventを遅延する$モノトスル: ◎ If an element type potentially delays the load event, then for each element element of that type, the user agent must delay the load event of element's node document if element's content navigable is non-null and any of the following are true:

注記: `load$et ~eventの取扱い中に %~navigable が再度`~navigate$された場合、 それにより更に`~load~eventを遅延する$ことになる。 ◎ If, during the handling of the load event, element's content navigable is again navigated, that will further delay the load event.

各 `iframe$e 要素には、 真偽値をとる `現在の~naviは~lazyに読込まれるか@ が結付けられ,初期~時は ~F とする。 それは、 `~iframe属性~群を処理する$中で[ ~T/~F ]に設定される。 ◎ Each iframe element has an associated current navigation was lazy loaded boolean, initially false. It is set and unset in the process the iframe attributes algorithm.

`iframe$e 要素は、[ `現在の~naviは~lazyに読込まれるか$ ~EQ ~F ]ならば,`~load~eventを遅延し得る$とする。 ◎ An iframe element whose current navigation was lazy loaded boolean is false potentially delays the load event.

注記: 当の要素†の作成-時に,[ `srcdoc$aF 属性を有してなかった ]~AND[ `src$aF 属性を有してなかったか, 有していたが その値を成す`~URLを符号化法の下で相対的に構文解析する$のに失敗した ]場合、 要素の`内容~navigable$は,`まだ初期~about_blank 文書で$あり続けることになる。 【† `iframe^e 要素に限られない? — この注記は、 過去には,他の要素にも適用される “`~load~eventを遅延し得る$” のすぐ後に置かれていたので。】 ◎ If, when the element is created, the srcdoc attribute is not set, and the src attribute is either also not set or set but its value cannot be parsed, the element's content navigable will remain at the initial about:blank Document.

注記: 利用者がこの~page【 `~about_blank^sc に限られない?】から他所へ`~navigate$した場合、 `iframe$e 要素の`内容~navigable$にて`作動中な~WindowProxy$navは, 新たな`文書$用の新たな`~window$を代理することになるが、 要素の `src$aF 属性は変化しない。 ◎ If the user navigates away from this page, the iframe's content navigable's active WindowProxy object will proxy new Window objects for new Document objects, but the src attribute will not change.


`name@aF 属性に指定する値は、 `妥当な~navigable~target名$でなければナラナイ。 その値は、 当の `iframe$e 要素の`内容~navigable$に名前を与えるために利用される — それが`作成され@~HTMLds#create-a-new-child-navigable$る時点で,この属性が在るならば。 ◎ The name attribute, if present, must be a valid navigable target name. The given value is used to name the element's content navigable if present when that is created.


`iframe$e 要素に `sandbox@aF 属性が指定された場合、 要素が~hostする内容に対し,~~追加の制約の集合を可能化する。 指定する値は、[ `~space等で分離された~token集合$(大小無視で一意) ]でなければナラナイ。 下の表tの 1 列目に挙げる~keyword値が~tokenとして許容される。 ◎ The sandbox attribute, when specified, enables a set of extra restrictions on any content hosted by the iframe. Its value must be an unordered set of unique space-separated tokens that are ASCII case-insensitive. The allowed values are: • allow-downloads • allow-forms • allow-modals • allow-orientation-lock • allow-pointer-lock • allow-popups • allow-popups-to-escape-sandbox • allow-presentation • allow-same-origin • allow-scripts • allow-top-navigation • allow-top-navigation-by-user-activation • allow-top-navigation-to-custom-protocols

この属性が設定された下では、 要素により埋込まれる内容は,一意な`不透明な生成元$に属するものと扱われ、 それにより,[ ~form, ~script, 様々な悩ましいものになり得る~API ]は不能化され, ~linkに対しては 他の`~navigable$を~targetにすることは防止される。 加えて,各種~keywordには、 これらの制約の一部を緩めるような効果がある: ◎ When the attribute is set, the content is treated as being from a unique opaque origin, forms, scripts, and various potentially annoying APIs are disabled, and links are prevented from targeting other navigables.\

`sandbox$aF 属性に指定できる~keywordとその効果
~keyword 効果 【詳細は、`§ ~sandbox法@~ORIGIN#sandboxing$を見よ】
`allow-same-origin$v 内容を`不透明な生成元$に属するよう強制する代わりに,その本当の生成元に属するものと扱われるようにする
`allow-top-navigation$v 内容が その`辿可能な~navigable$navを`~navigate$できるようにする
`allow-top-navigation-by-user-activation$v `allow-top-navigation$v と類似に挙動するが、 そのような`~navi$を許容するのを[ 当の`~navigable$【!閲覧~文脈】にて`作動中な~window$navが`一過な作動化を有して$いるとき ]に限るようにする
`allow-top-navigation-to-custom-protocols$v 非`~fetch~scheme$へ向かう~naviを`外部~softwareに手渡す$ことを可能化し直す
`allow-forms$v ~formを可能化し直す
`allow-modals$v ~modal~dialogを可能化し直す
`allow-orientation-lock$v ~screen方位~lockを可能化し直す `SCREENORIENTATION$r
`allow-pointer-lock$v ~pointer~lock~APIを可能化し直す `POINTERLOCK$r
`allow-popups$v ~popupを可能化し直す
`allow-presentation$v 呈示~APIを可能化し直す `PRESENTATION$r
`allow-scripts$v ~scriptを可能化し直す
`allow-popups-to-escape-sandbox$v ~sandbox化されない`補助~閲覧~文脈$の作成を可能化し直す
`allow-downloads$v ~downloadを遂行することを内容に許容する
◎ The allow-same-origin keyword causes the content to be treated as being from its real origin instead of forcing it into an opaque origin;\ the allow-top-navigation keyword allows the content to navigate its traversable navigable;\ the allow-top-navigation-by-user-activation keyword behaves similarly but allows such navigation only when the browsing context's active window has transient activation;\ the allow-top-navigation-to-custom-protocols reenables navigations toward non fetch scheme to be handed off to external software;\ and the allow-forms, allow-modals, allow-orientation-lock, allow-pointer-lock, allow-popups, allow-presentation, allow-scripts, and allow-popups-to-escape-sandbox keywords re-enable forms, modal dialogs, screen orientation lock, the pointer lock API, popups, the presentation API, scripts, and the creation of unsandboxed auxiliary browsing contexts respectively.\ The allow-downloads keyword allows content to perform downloads.\ [POINTERLOCK] [SCREENORIENTATION] [PRESENTATION]

`allow-top-navigation$v, `allow-top-navigation-by-user-activation$v 両~keywordとも指定してはナラナイ — そうすることは冗長なので。 そのような適合しない~markupにおいては、 `allow-top-navigation$v のみ効果がある。 ◎ The allow-top-navigation and allow-top-navigation-by-user-activation keywords must not both be specified, as doing so is redundant; only allow-top-navigation will have an effect in such non-conformant markup.

類似に, `allow-top-navigation-to-custom-protocols$v ~keywordは、[ `allow-top-navigation$v / `allow-popups$v ]を指定した場合には,指定してはナラナイ — そうすることは冗長なので。 ◎ Similarly, the allow-top-navigation-to-custom-protocols keyword must not be specified if either allow-top-navigation or allow-popups are specified, as doing so is redundant.

注記: ~sandbox化された内容の内側で[ `alert()$m / `confirm()$m / `prompt()$m ]を許容するためには、 `allow-modals$v, `allow-same-origin$v 両~keywordを指定する必要があり,読込まれる~URLは`~top-level生成元$enVと`同一-生成元$である必要もある。 `allow-same-origin$v ~keywordを伴わない場合、 内容は常に非同一-生成元に属するものと扱われ,`単純~dialogを示せない$。 ◎ To allow alert(), confirm(), and prompt() inside sandboxed content, both the allow-modals and allow-same-origin keywords need to be specified, and the loaded URL needs to be same origin with the top-level origin. Without the allow-same-origin keyword, the content is always treated as cross-origin, and cross-origin content cannot show simple dialogs.

`allow-scripts$v, `allow-same-origin$v 両~keywordとも設定することは、[ 埋込まれた~pageと それを包含している `iframe$e とが`同一-生成元$に属する ]ときには,[ 埋込まれた~pageが単純に `sandbox$aF 属性を除去して,自身を再度~読込む ]ことにより[ 実質的に,~sandboxを突破して無にする ]ことを許容することになる。 ◎ Setting both the allow-scripts and allow-same-origin keywords together when the embedded page has the same origin as the page containing the iframe allows the embedded page to simply remove the sandbox attribute and then reload itself, effectively breaking out of the sandbox altogether.

これらの~flagが効果を~~発揮するのは、 当の `iframe$e 要素の`内容~navigable$が`~navigate$されるときに限られる。 すでに読込まれた~pageに対しては、 これらの~flagのうち一部を除去しようが `sandbox$aF 属性をまるごと除去しようが, 効果はない。 ◎ These flags only take effect when the content navigable of the iframe element is navigated. Removing them, or removing the entire sandbox attribute, has no effect on an already-loaded page.

敵対的になり得る~fileは、[ 当の `iframe$e 要素を包含している~fileと同じ~server ]から~serveされるべきでない。 敵対的な内容を~sandbox化することは、 攻撃者が[ `iframe$e 内ではなく,敵対的な内容へ直に訪問する ]よう利用者を仕向けれる場合のためにあり,必要最小限な助けでしかない。 敵対的な~HTML内容がもたらし得る被害を制限するには、 別々な専用~domainから~serveするべきである。 異なる~domainを利用すれば、 利用者が[ `sandbox$aF 属性による保護なしに,そのような~pageへ直に訪問する ]よう騙された場合でも,[ ~file内の~scriptは,~siteを攻撃-不能になる ]ことが確保される。 ◎ Potentially hostile files should not be served from the same server as the file containing the iframe element. Sandboxing hostile content is of minimal help if an attacker can convince the user to just visit the hostile content directly, rather than in the iframe. To limit the damage that can be caused by hostile HTML content, it should be served from a separate dedicated domain. Using a different domain ensures that scripts in the files are unable to attack the site, even if the user is tricked into visiting those pages directly, without the protection of the sandbox attribute.

[ `iframe$e 要素 %iframe の`内容~navigable$ ~NEQ ~NULL ]の下では、 ~UAは,次に従うモノトスル: ◎ ↓

  • %iframe の`sandbox$aF 属性が[ 設定-/変更- ]されたときは ⇒ `~sandbox法~指令を構文解析する$( %iframe の `sandbox$aF 属性の値, %iframe の`~iframe~sandbox法~flag集合$ ) ◎ When an iframe element's sandbox attribute is set or changed while it has a non-null content navigable, the user agent must parse the sandboxing directive given the attribute's value and the iframe element's iframe sandboxing flag set.
  • %iframe の `sandbox$aF 属性が除去されたときは ⇒ %iframe の`~iframe~sandbox法~flag集合$を空にする ◎ When an iframe element's sandbox attribute is removed while it has a non-null content navigable, the user agent must empty the iframe element's iframe sandboxing flag set.

この例では、 ~page内には,利用者が供した ある[ 完全に未知な,敵対的にもなり得る~HTML内容 ]が埋込まれている。 それは,ある別々な~domainから~serveされるので、 非同一-~siteに対する通常の制約~すべてから影響される。 加えて,埋込まれた~pageにおいては、[ ~scripting, ~plugin, ~form ]は不能化され,自身以外のどの[ ~frame/~window ]も(自身が埋込んだものも含め)~navigateできない。 ◎ In this example, some completely-unknown, potentially hostile, user-provided HTML content is embedded in a page. Because it is served from a separate domain, it is affected by all the normal cross-site restrictions. In addition, the embedded page has scripting disabled, plugins disabled, forms disabled, and it cannot navigate any frames or windows other than itself (or any frames or windows it itself embeds).

`iframe-2^xCode

別々な~domainを利用することは、 攻撃者が利用者を[ その~pageを直に訪問させ、 ~page内に見出されるどの攻撃からも脆弱にする ]よう仕向けても,[ そのような~pageが,当の~siteの生成元の文脈の下で走ることはない ]ようにするために重要になる。 ◎ It is important to use a separate domain so that if the attacker convinces the user to visit that page directly, the page doesn't run in the context of the site's origin, which would make the user vulnerable to any attack found in the page.

次の例では、 別の~siteからの ある~gadgetが埋込まれている。 この~gadgetでは、 ~scriptingと~formが可能化されていて、 ~gadgetが,出自の~serverと通信できるよう,生成元~sandbox制約は~~軽くされている。 しかしながら,~sandboxは、[ ~pluginと~popup ]を不能化して,利用者が[ ~malwareその他の いまいましいもの ]に晒されるのを抑制するので, 依然として有用になる。 ◎ In this example, a gadget from another site is embedded. The gadget has scripting and forms enabled, and the origin sandbox restrictions are lifted, allowing the gadget to communicate with its originating server. The sandbox is still useful, however, as it disables plugins and popups, thus reducing the risk of the user being exposed to malware and other annoyances.

`iframe-3^xCode

~file %A は、 次の~iframeを包含しているとする: ◎ Suppose a file A contained the following fragment:

`iframe-4^xCode

~file %B も~iframeも包含していたとする: ◎ Suppose that file B contained an iframe also:

`iframe-5^xCode

更に、 ~file %C は~page %D への~linkを包含していたとする: ◎ Further, suppose that file C contained a link:

`iframe-6^xCode

この例に対しては、 どの~fileも `text/html$mt として~serveされているとする。 ◎ For this example, suppose all the files were served as text/html.

この局面における~page %C に対しては、 すべての~sandbox法~flagが設定される。 %A 内の `iframe$e では~scriptは不能化されるので、 %C においては[ %B 内の `iframe$e 内に設定された `allow-scripts$v ~keyword ]は上書きされ, ~scriptは不能化される。 また、 ~formも不能化される — ( %B 内の)内縁 `iframe$e 内には `allow-forms$v ~keywordは設定されてないので。 ◎ Page C in this scenario has all the sandboxing flags set. Scripts are disabled, because the iframe in A has scripts disabled, and this overrides the allow-scripts keyword set on the iframe in B. Forms are also disabled, because the inner iframe (in B) does not have the allow-forms keyword set.

今ここで、 %A 内の~scriptが %A, %B 内のすべての `sandbox$aF 属性を除去したとする。 これは、 即時には何も変更しない。 利用者が %C 内の~linkを~clickして, %B 内の `iframe$e の中に~page %D を読込んだ場合、 ~page %D は今や,[ %B 内の `iframe$e に[ `allow-same-origin$v, `allow-forms$v ]~keywordが設定されていた ]かのように動作する — それが、[ ~page%B が読込まれた時点で, %A 内の `iframe$e の`内容~navigable$の状態 ]であったので。 ◎ Suppose now that a script in A removes all the sandbox attributes in A and B. This would change nothing immediately. If the user clicked the link in C, loading page D into the iframe in B, page D would now act as if the iframe in B had the allow-same-origin and allow-forms keywords set, because that was the state of the content navigable in the iframe in A when page B was loaded.

一般に, `sandbox$aF 属性は、 動的に除去したり変更しないことを勧める — そうすると、[ 許容されるもの, されないもの ]を選り分けるのが難しくなり得るので。 ◎ Generally speaking, dynamically removing or changing the sandbox attribute is ill-advised, because it can make it quite hard to reason about what will be allowed and what will not.


`allow@aF 属性は、 指定されたときは,`容器~施策$を決定する — それは、[ `iframe$e の`内容~navigable$に属する`文書$用の`許可~施策$doc ]が初期化されるとき,利用されることになる。 値は、 `直列形の許可~施策$でなければナラナイ。 `PERMISSIONSPOLICY$r ◎ The allow attribute, when specified, determines the container policy that will be used when the permissions policy for a Document in the iframe's content navigable is initialized. Its value must be a serialized permissions policy. [PERMISSIONSPOLICY]

次の例では、 ~online~navi~serviceからの地図を埋込むために, `iframe$e が利用される。 `allow$aF 属性は、 入子な文脈の中で Geolocation ~APIを可能化するために利用される。 ◎ In this example, an iframe is used to embed a map from an online navigation service. The allow attribute is used to enable the Geolocation API within the nested context.

`iframe-7^xCode

`allowfullscreen@aF 属性は,`真偽-属性$であり、 指定されたときは,[ `iframe$e 要素の`内容~navigable$に属する`文書$は、[ どの`生成元$からでも, `fullscreen^l 特能の利用を許容する ]よう,`許可~施策$docで初期化されることになる ]ことを指示する。 これは、 `許可~施策~属性を処理する$ ~algoにより施行される。 `PERMISSIONSPOLICY$r ◎ The allowfullscreen attribute is a boolean attribute. When specified, it indicates that Document objects in the iframe element's content navigable will be initialized with a permissions policy which allows the "fullscreen" feature to be used from any origin. This is enforced by the process permissions policy attributes algorithm. [PERMISSIONSPOLICY]

ここでの `iframe$e は、 動画~siteからの再生器を埋込むために利用されている。 この再生器が動画を全~screen化するのを可能化するためには、 `allowfullscreen$aF 属性が必要になる。 ◎ Here, an iframe is used to embed a player from a video site. The allowfullscreen attribute is needed to enable the player to show its video fullscreen.

`iframe-8^xCode

注記: [ `allow$aF / `allowfullscreen$aF ]属性は、 すでに[ それを有する `iframe$e 要素 %要素 の`~node文書$には, ある特能 %特能 の`利用は許容されて$いない ]場合には,[ %要素 の`内容~navigable$における %特能 への~access ]を是認し得ない。 ◎ Neither allow nor allowfullscreen can grant access to a feature in an iframe element's content navigable if the element's node document is not already allowed to use that feature.

`文書$ %文書 には,`施策により制御される特能$ %特能 の `利用は許容されて@ いるかどうか決定するときは、 次を走らす: ◎ To determine whether a Document object document is allowed to use the policy-controlled-feature feature, run these steps:

  1. ~IF[ %文書 が`属する閲覧~文脈$ ~EQ ~NULL ] ⇒ ~RET ~F ◎ If document's browsing context is null, then return false.
  2. ~IF[ %文書 は`全部的に作動中$でない ] ⇒ ~RET ~F ◎ If document is not fully active, then return false.
  3. ~IF[ `文書~内の特能は生成元~用に可能化されるか$( %特能, %文書, %文書 の`生成元$doc ) ~EQ `可能化される^i ] ⇒ ~RET ~T ◎ If the result of running is feature enabled in document for origin on feature, document, and document's origin is "Enabled", then return true.
  4. ~RET ~F ◎ Return false.

[ `allow$aF / `allowfullscreen$aF ]属性が波及するのは, それを有する `iframe$e 要素の`内容~navigable$ %~navigable にて`作動中な文書$navの`許可~施策$docに限られるので、 これらの属性が効果を~~発揮するのは, %~navigable が`~navigate$されるときに限られる。 これらの属性を追加しようが除去しようが,すでに読込んだ文書に対する効果は無い。 ◎ Because they only influence the permissions policy of the content navigable's active document, the allow and allowfullscreen attributes only take effect when the content navigable of the iframe is navigated. Adding or removing them has no effect on an already-loaded document.


`iframe$e 要素は、 埋込d内容に特有な寸法がある場合は,`寸法~属性$を~supportする(例: ~~定義済み寸法がある広告unitなど)。 ◎ The iframe element supports dimension attributes for cases where the embedded content has specific dimensions (e.g. ad units have well-defined dimensions).

`iframe$e 要素には、 `~fallback内容$は決してない — 指定された初期~内容が成功裡に利用されようがされまいが、 それは常に,`新たな子~navigableを作成する$ことになるので。 ◎ An iframe element never has fallback content, as it will always create a new child navigable, regardless of whether the specified initial contents are successfully used.


`referrerpolicy@aF 属性は、 `~referrer施策~属性$である。 その目的は、 `~iframe属性~群を処理する$ときに利用される`~referrer施策$を設定することである。 `REFERRERPOLICY$r ◎ The referrerpolicy attribute is a referrer policy attribute. Its purpose is to set the referrer policy used when processing the iframe attributes. [REFERRERPOLICY]

`loading@aF 属性は、 `~lazy読込ng属性$である。 その目的は、 表示域の外側にある `iframe$e 要素を読込むときの施策を指示することにある。 ◎ The loading attribute is a lazy loading attribute. Its purpose is to indicate the policy for loading iframe elements that are outside the viewport.

`iframe$e 要素の %iframe の `loading$aF 属性の状態が `Eager$st に変化したときは、 ~UAは,次の手続きを走らすモノトスル: ◎ When the loading attribute's state is changed to the Eager state, the user agent must run these steps:

  1. %再開~手続き ~LET %iframe の`~lazy読込n再開~手続き$ ◎ Let resumptionSteps be the iframe element's lazy load resumption steps.
  2. ~IF[ %再開~手続き ~EQ ~NULL ] ⇒ ~RET ◎ If resumptionSteps is null, then return.
  3. %iframe の`~lazy読込n再開~手続き$ ~SET ~NULL ◎ Set the iframe's lazy load resumption steps to null.
  4. %再開~手続き を呼出す ◎ Invoke resumptionSteps.

`iframe$e 要素の子孫は、 何も表現しない( `iframe$e 要素を~supportしない旧来の~UAにおいては、 その内容は ~markupとして構文解析され,~fallback内容として動作し得る。) ◎ Descendants of iframe elements represent nothing. (In legacy user agents that do not support iframe elements, the contents would be parsed as markup that could act as fallback content.)

注記: `~HTML構文解析器$は、 `iframe$e 要素の内側にある~markupを~textとして扱う。 ◎ The HTML parser treats markup inside iframe elements as text.


`src@mF ~IDL属性は、 `src$aF 内容~属性を`反映する$モノトスル。

`srcdoc@mF ~IDL属性は、 `srcdoc$aF 内容~属性を`反映する$モノトスル。

`name@mF ~IDL属性は、 `name$aF 内容~属性を`反映する$モノトスル。

`sandbox@mF ~IDL属性は、 `sandbox$aF 内容~属性を`反映する$モノトスル。

`sandbox$mF 属性が `DOMTokenList$I 用に`~supportする~token集合$は、[ `sandbox$aF 内容~属性に定義された許容される値のうち,~UAが~supportするもの ]からなるとする。

`allow@mF ~IDL属性は、 `allow$aF 内容~属性を`反映する$モノトスル。

◎ The IDL attributes src, srcdoc, name, sandbox, and allow must reflect the respective content attributes of the same name. ◎ The supported tokens for sandbox's DOMTokenList are the allowed values defined in the sandbox attribute and supported by the user agent.

`allowFullscreen@mF ~IDL属性は、 `allowfullscreen$aF 内容~属性を`反映する$モノトスル。 ◎ The allowFullscreen IDL attribute must reflect the allowfullscreen content attribute.

`referrerPolicy@mF ~IDL属性は、 `既知な値のみに制限され$る下で, `referrerpolicy$aF 内容~属性を`反映する$モノトスル。 ◎ The referrerPolicy IDL attribute must reflect the referrerpolicy content attribute, limited to only known values.

`loading@mF ~IDL属性は、 `既知な値のみに制限され$る下で, `loading$aF 内容~属性を`反映する$モノトスル。 ◎ The loading IDL attribute must reflect the loading content attribute, limited to only known values.

`contentDocument@mF 取得子~手続きは ⇒ ~RET コレの`内容~文書$ ◎ The contentDocument getter steps are to return the this's content document.
`contentWindow@mF 取得子~手続きは ⇒ ~RET コレの`内容~window$ ◎ The contentWindow getter steps are to return this's content window.

`iframe$e を用いて 広告~代行業者からの広告を含ませる例: ◎ Here is an example of a page using an iframe to include advertising from an advertising broker:

`iframe-9^xCode

4.8.6. `embed^e 要素

`分類$
`~flow内容$ / `句ng内容$ / `埋込d内容$ /`対話的~内容$ / `可触~内容$ ◎ Flow content. ◎ Phrasing content. ◎ Embedded content. ◎ Interactive content. ◎ Palpable content.
`この要素を利用できる文脈$
`埋込d内容$が期待される所。 ◎ Where embedded content is expected.
`内容~model$
`なし$ ◎ Nothing.
`text/html における~tag省略$
`終了~tag$はない。 ◎ No end tag.
`内容~属性$
`大域~属性$ ◎ Global attributes
`src$aE — 埋込む資源の~address ◎ src — Address of the resource
`type$aE — 埋込む資源の型 ◎ type — Type of embedded resource
`width$a — 横~寸法 ◎ width — Horizontal dimension
`height$a — 縦~寸法 ◎ height — Vertical dimension
どの名前空間にも属さない任意の属性(注釈文を見よ)。 ◎ Any other attribute that has no namespace (see prose).
`~accessibilityの考慮点$
`embed$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLEmbedElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute USVString `src$mE;
  [`CEReactions$] attribute DOMString `type$mE;
  [`CEReactions$] attribute DOMString `width$m;
  [`CEReactions$] attribute DOMString `height$m;
  `Document$I? `getSVGDocument$m();

  // `HTMLEmbedElement$obsMb
};

`embed$e 要素は、[ 外部~app/対話的~内容 ]用に統合~~地点を供する。 ◎ The embed element provides an integration point for an external application or interactive content.

`src@aE 属性は、 埋込まれる資源の`~URL$を与える。 この属性に指定する値は、 `前後~空白~可の妥当かつ空でない~URL$でなければナラナイ。 ◎ The src attribute gives the URL of the resource being embedded. The attribute, if present, must contain a valid non-empty URL potentially surrounded by spaces.

`embed$e 要素が `itemprop$a を有する場合、 `src$aE 属性も有していなければナラナイ。 ◎ If the itemprop attribute is specified on an embed element, then the src attribute must also be specified.

`type@aE 属性は、 在るならば`~MIME型$を与え、 ~instance化される~pluginは,それにより選定される。 指定する値は、 `妥当な~MIME型~文字列$でなければナラナイ。 要素が `type$aE, `src$aE 両 属性とも有する場合、 `type$aE 属性には,[ `src$aE 属性に与えられた資源 ]の[ 明示的な`~Content-Type~metadata$ ]と同じ型を指定しなければナラナイ。 ◎ The type attribute, if present, gives the MIME type by which the plugin to instantiate is selected. The value must be a valid MIME type string. If both the type attribute and the src attribute are present, then the type attribute must specify the same type as the explicit Content-Type metadata of the resource given by the src attribute.

`embed$e 要素が ~OR↓ を満たしている間は、 要素~用に~instance化された`~plugin$は,除去するモノトスル — 要素は何も`表現-$しなくなる: ◎ While any of the following conditions are occurring, any plugin instantiated for the element must be removed, and the embed element represents nothing:

`embed$e 要素は、 次の条件すべてを同時に満たすとき `作動中になれ@ るとされる (その否定は、 単に “作動中になれない” ): ◎ An embed element is said to be potentially active when the following conditions are all met simultaneously:

`embed$e 要素 %embed において,次のいずれかが生じたときは…:

  • `作動中になれ$ない~~状態から`作動中になれ$るようになったとき
  • `作動中になれ$るまま,その[ `src$aE 属性, または `type$aE 属性 ]が[ 設定- / 変更- / 除去- ]されたとき

…~UAは、 次を行うモノトスル ⇒ 次を走らす`要素~taskを~queueする$( `~embed~task~source@, %embed ) ⇒ `~embed要素を設定しておく$( %embed )

◎ Whenever an embed element that was not potentially active becomes potentially active, and whenever a potentially active embed element that is remaining potentially active and has its src attribute set, changed, or removed or its type attribute set, changed, or removed, the user agent must queue an element task on the embed task source given the element to run the embed element setup steps for that element.

`~embed要素を設定しておく@ 手続きは、 所与の ( `embed$e 要素 %embed ) に対し,次を走らす: ◎ The embed element setup steps for a given embed element element are as follows:

  1. %現~task ~LET %embed に対し この手続きを走らせている`~task$ ◎ ↓
  2. ~IF[ %現~task より後に~queueされた,[ %embed に対し この手続きを走らす,別の`~task$ ]が在る ] ⇒ ~RET ◎ If another task has since been queued to run the embed element setup steps for element, then return.
  3. ~IF[ %embed は `src$aE 属性を有する ]: ◎ If element has a src attribute set, then:

    1. %~URL ~LET `~URLを符号化法の下で相対的に構文解析する$( %embed の `src$aE 属性の値, %embed の`~node文書$ ) ◎ Let url be the result of encoding-parsing a URL given element's src attribute's value, relative to element's node document.
    2. ~IF[ %~URL ~EQ `失敗^i ] ⇒ ~RET ◎ If url is failure, then return.
    3. %要請 ~LET 新たな`要請$ — その ⇒# `~URL$rq ~SET %~URL, `~client$rq ~SET %embed の`~node文書$に`関連な設定群~obj$, `行先$rq ~SET `embed^l, `資格証~mode$rq ~SET `include^l, `~mode$rq ~SET `navigate^l, `起動元~種別$rq ~SET `embed^l, `~URL資格証を利用するか$rq ~SET ~T ◎ Let request be a new request whose URL is url, client is element's node document's relevant settings object, destination is "embed", credentials mode is "include", mode is "navigate", initiator type is "embed", and whose use-URL-credentials flag is set.
    4. %要請 を`~fetchする$ — 次を与える下で: ◎ Fetch request, with\

      • `応答の処理n$i ~SET 所与の ( `応答$ %応答 ) に対し,次を走らす手続き: ◎ processResponse set to the following steps given response response:

        1. ~IF[ %現~task より後に~queueされた,[ %embed に対し この手続きを走らす,別の`~task$ ]が在る ] ⇒ ~RET ◎ If another task has since been queued to run the embed element setup steps for element, then return.
        2. ~IF[ %応答 は`~network~error$である ] ⇒# `~eventを発火する$( %embed, `load$et ); ~RET ◎ If response is a network error, then fire an event named load at element, and return.
        3. %型 ~LET `内容の型を決定する$( %embed, %応答 ) ◎ Let type be the result of determining the type of content given element and response.
        4. ~IF[ %型 ~EQ ~NULL ] ⇒ %embed 用の`~pluginなしを表示する$ ◎ Switch on type: ◎ null • Display no plugin for element.
        5. ~ELSE: ◎ Otherwise

          1. %~navigable ~LET %embed の`内容~navigable$ ◎ ↓
          2. ~IF[ %~navigable ~EQ ~NULL ] ⇒ %~navigable ~SET `新たな子~navigableを作成する$( %embed ) ◎ If element's content navigable is null, then create a new child navigable for element.
          3. `~navigableを~URLへ~navigateする$( %~navigable, %応答 の`~URL$rs, %embed の`~node文書$ ) — 次も与える下で ⇒# `応答^i ~SET %応答, `履歴~取扱い^i ~SET `replace$hH ◎ Navigate element's content navigable to response's URL using element's node document, with response set to response, and historyHandling set to "replace".

            注記: %embed の `src$aE 属性は、 %~navigable が更に他の所在に~navigateされても更新されない。 ◎ element's src attribute does not get updated if the content navigable gets further navigated to other locations.

          4. この時点で、 %embed は,自身の`内容~navigable$を`表現-$する ◎ element now represents its content navigable.

      資源を~fetchするときは、 %embed の`~node文書$の`~load~eventを遅延する$モノトスル。 ◎ Fetching the resource must delay the load event of element's node document.

  4. ~ELSE ⇒ %embed 用の`~pluginなしを表示する$ ◎ Otherwise, display no plugin for element.

`内容の型を決定する@ ときは、 所与の ( `embed$e 要素 %embed, `応答$ %応答 ) に対し,次の手続きを走らす: ◎ To determine the type of the content given an embed element element and a response response, run the following steps:

  1. ~IF[ %embed は `type$aE 属性を有していて,その値は ある`~plugin$が~supportする型である ] ⇒ ~RET その値 ◎ If element has a type attribute, and that attribute's value is a type that a plugin supports, then return the value of the type attribute.
  2. ~IF[ %応答 の`~URL$rsの`~path$url成分は ある`~plugin$が~supportする~patternに合致する ] ⇒ ~RET その~pluginが取扱える型 ◎ If the path component of response's url matches a pattern that a plugin supports, then return the type that that plugin can handle.

    例えば,ある~pluginは、[ `~path$url成分が文字列 `.swf^l で終端する ]ような~URLを取扱えるとしていることもある。 ◎ For example, a plugin might say that it can handle URLs with path components that end with the four character string ".swf".

    【 ~patternに合致する複数の~pluginがある場合に[ どの~pluginが選定されるか / 当の~pluginが複数の型を取扱える場合に,どの型が選定されるか ]については、 ここには述べられていない — 実装定義な(何らかの環境設定に基づく)仕組みで選定されるものと見做されているようだ。 他所にも~pluginを選定する記述があるが、 同様と見受けられる。 】

  3. ~IF[ %応答 には明示的な`~Content-Type~metadata$があって,その値は ある`~plugin$が~supportする型である ] ⇒ ~RET その値 ◎ If response has explicit Content-Type metadata, and that value is a type that a plugin supports, then return that value.
  4. ~RET ~NULL ◎ Return null.

注記: 上の~algoが`~ok状態s$でない応答を許容するのは、 意図的である。 これにより,~serverは、 ~error応答においても~plugin用の~dataを返せるようになる(例: ~HTTP状態s~code 500 ( Internal Server Error ) であっても、 ~plugin~dataを包含できる)。 ◎ It is intentional that the above algorithm allows response to have a non-ok status. This allows servers to return data for plugins even with error responses (e.g., HTTP 500 Internal Server Error codes can still contain plugin data).

`embed$e 要素 %embed 用の `~pluginなしを表示する@ ときは: ◎ To display no plugin for an embed element element:

  1. `子~navigableを破壊する$( %embed ) ◎ Destroy a child navigable given element.
  2. %embed 用の`~plugin$は見出せなかった指示を表示する ◎ Display an indication that no plugin could be found for element, as the contents of element.
  3. この時点で、 %embed は何も`表現-$しない ◎ element now represents nothing.

注記: `embed$e 要素には、 `~fallback内容$は無い — その子孫は無視される。 ◎ The embed element has no fallback content; its descendants are ignored.

`作動中になれ$る `embed$e 要素が,`作動中になれ$なくなったときは、 要素~用に~instance化されていた`~plugin$を~unloadするモノトスル。 ◎ Whenever an embed element that was potentially active stops being potentially active, any plugin that had been instantiated for that element must be unloaded.

`embed$e 要素は、 `~load~eventを遅延し得る$とする。 ◎ The embed element potentially delays the load event.

`embed$e 要素は、 `寸法~属性$を~supportする。 ◎ The embed element supports dimension attributes.

`src@mE ~IDL属性は、 `src$aE 内容~属性を`反映する$モノトスル。

`type@mE ~IDL属性は、 `type$aE 内容~属性を`反映する$モノトスル。

◎ The IDL attributes src and type each must reflect the respective content attributes of the same name.

4.8.7. `object^e 要素

`分類$
`~flow内容$ / `句ng内容$ / `埋込d内容$ / `可触~内容$ / `~listされる要素$ / `~formに所有され得る要素$ ◎ Flow content. ◎ Phrasing content. ◎ Embedded content. ◎ Listed form-associated element. ◎ Palpable content.
`この要素を利用できる文脈$
`埋込d内容$が期待される所。 ◎ Where embedded content is expected.
`内容~model$
`透過的な内容$ ◎ Transparent.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`data$aO — 埋込む資源の~address ◎ data — Address of the resource
`type$aO — 埋込む資源の型 ◎ type — Type of embedded resource
`name$aO — `内容~navigable$の名前 ◎ name — Name of content navigable
`form$a — この要素の所有者にする `form$e 要素 ◎ form — Associates the element with a form element
`width$a — 横~寸法 ◎ width — Horizontal dimension
`height$a — 縦~寸法 ◎ height — Vertical dimension
`~accessibilityの考慮点$
`object$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLObjectElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute USVString `data$mO;
  [`CEReactions$] attribute DOMString `type$mO;
  [`CEReactions$] attribute DOMString `name$mO;
  readonly attribute `HTMLFormElement$I? `form$m;
  [`CEReactions$] attribute DOMString `width$m;
  [`CEReactions$] attribute DOMString `height$m;
  readonly attribute `Document$I? `contentDocument$mO;
  readonly attribute `WindowProxy$I? `contentWindow$mO;
  `Document$I? `getSVGDocument$m();

  readonly attribute boolean `willValidate$m;
  readonly attribute `ValidityState$I `validity$m;
  readonly attribute DOMString `validationMessage$m;
  boolean `checkValidity$m();
  boolean `reportValidity$m();
  undefined `setCustomValidity$m(DOMString %error);

  // `HTMLObjectElement$obsMb
};

`object$e 要素により~instance化される内容の型に依存して、 ~nodeは,他の~interfaceも~supportする。 ◎ Depending on the type of content instantiated by the object element, the node also supports other interfaces.

`object$e 要素は、 外部~資源を表現できる — それは、 資源の型に依存して,[ 画像, `子~navigable$ ]いずれかとして扱われることになる。 ◎ The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image or as a child navigable.

`data@aO 属性は、 資源の`~URL$を指定する。 `object$e 要素は、 この属性を有していなければナラナイ — 指定する値は、 `前後~空白~可の妥当かつ空でない~URL$でなければナラナイ。 ◎ The data attribute specifies the URL of the resource. It must be present, and must contain a valid non-empty URL potentially surrounded by spaces.

`type@aO 属性は、 在るならば,資源の型を指定する。 この属性に指定する値は、 `妥当な~MIME型~文字列$でなければナラナイ。 ◎ The type attribute, if present, specifies the type of the resource. If present, the attribute must be a valid MIME type string.

`name@aO 属性に指定する値は、 `妥当な~navigable~target名$でなければナラナイ。 その値は、 適用-可能な場合には, 当の `object$e 要素の`内容~navigable$に名前を与えるために利用される — それが`作成され@~HTMLds#create-a-new-child-navigable$る時点で,この属性が在るならば。 ◎ The name attribute, if present, must be a valid navigable target name. The given value is used to name the element's content navigable, if applicable, and if present when the element's content navigable is created.

`object$e 要素 %object において,次のいずれかが生じたときは…: ◎ Whenever one of the following conditions occur:

  • 作成されたとき ◎ the element is created,
  • [ `~HTML構文解析器$ / `~XML構文解析器$ ]の`~open要素~stack$から~popされ除かれたとき ◎ the element is popped off the stack of open elements of an HTML parser or XML parser,
  • [ `~HTML構文解析器$ / `~XML構文解析器$ ]の`~open要素~stack$内に無い下で ⇒ [ `文書の中へ挿入され$た/`文書から除去され$た ]とき ◎ the element is not on the stack of open elements of an HTML parser or XML parser, and it is either inserted into a document or removed from a document,
  • その`~node文書$が`全部的に作動中$かどうかが変化したとき ◎ the element's node document changes whether it is fully active,
  • そのある先祖の `object$e 要素において[ `~fallback内容$を示しているかどうか ]が変化したとき ◎ one of the element's ancestor object elements changes to or from showing its fallback content,
  • その `classid$a 属性が[ 設定- / 変更- / 除去- ]されたとき ◎ the element's classid attribute is set, changed, or removed,
  • `classid$a 属性を有していない下で ⇒ その `data$aO 属性が[ 設定- / 変更- / 除去- ]されたとき ◎ the element's classid attribute is not present, and its data attribute is set, changed, or removed,
  • [ `classid$a, `data$aO ]両~属性とも有していない下で ⇒ その `type$aO 属性が[ 設定- / 変更- / 除去- ]されたとき ◎ neither the element's classid attribute nor its data attribute are present, and its type attribute is set, changed, or removed,
  • `具現化されて$いるかどうかが変化したとき ◎ the element changes from being rendered to not being rendered, or vice versa,

【 上の `classid$a に関する条件は、 もはや不要にも思われる — `classid$a に関係する処理は、 この仕様(以下の手続き)から除去されたので。 】

…~UAは、 次に従うモノトスル: ◎ ...the user agent\

  • 次を走らす`要素~taskを~queueする$( `~DOM操作~task~source$, %object ) ⇒ 以下に与える[ `object$e 要素 %object が表現するものを決定する(し直す) ]手続き ◎ must queue an element task on the DOM manipulation task source given the object element to run the following steps to (re)determine what the object element represents.\
  • この`~task$が[ `~queueされ$ている, または【!actively】走っている ]間は、 %object の`~node文書$の`~load~eventを遅延する$。 ◎ This task being queued or actively running must delay the load event of the element's node document.
  1. ~IF[ 利用者は、 %object の通例の挙動に代えて %object の`~fallback内容$を示す選好を指示した ] ⇒ ~GOTO `~fallback$i ◎ If the user has indicated a preference that this object element's fallback content be shown instead of the element's usual behavior, then jump to the step below labeled fallback.

    注記: 利用者は、 例えば %object の`~fallback内容$の方がより~access可能な形式であると見出したときに,それを示すよう依頼することもできる。 ◎ For example, a user could ask for the element's fallback content to be shown because that content uses a format that the user finds more accessible.

  2. ~IF[ ~OR↓ ]… ◎ ↓

    • %object の先祖には`~media要素$が在る ◎ If the element has an ancestor media element,\
    • %object の先祖には[ `~fallback内容$を示していない `object$e 要素 ]が在る ◎ or has an ancestor object element that is not showing its fallback content,\
    • %object は`文書~内に$ない ◎ ↓
    • %object の`~node文書$が`属する閲覧~文脈$ ~EQ ~NULL ◎ or if the element is not in a document whose browsing context is non-null,\
    • %object の`~node文書$は`全部的に作動中$でない ◎ or if the element's node document is not fully active,\
    • %object は,まだ[ `~HTML構文解析器$ / `~XML構文解析器$ ]の`~open要素~stack$内に在る ◎ or if the element is still in the stack of open elements of an HTML parser or XML parser,\
    • %object は`具現化されて$いない ◎ or if the element is not being rendered,\

    …ならば ⇒ ~GOTO `~fallback$i ◎ then jump to the step below labeled fallback.

  3. %data ~LET [ %object は `data$aO 属性を有するならば その値 / ~ELSE_ ε ] ◎ ↓
  4. %type ~LET [ %object は `type$aO 属性を有するならば その値 / ~ELSE_ ε ] ◎ ↓
  5. ~IF[ %data ~IN { ε, 空~文字列 } ] ⇒ ~GOTO `~fallback$i ◎ If the data attribute is present and its value is not the empty string, then:
  6. 任意選択で ⇒ ~IF[ %type ~NEQ ε ]~AND[ %type は~UAが~supportする型でない ] ⇒ ~GOTO `~fallback$i (その本当の型を精査するために内容を~fetchすることなく。) ◎ If the type attribute is present and its value is not a type that the user agent supports, then the user agent may jump to the step below labeled fallback without fetching the content to examine its real type.
  7. %~URL ~LET `~URLを符号化法の下で相対的に構文解析する$( %data, %object の`~node文書$ ) ◎ Let url be the result of encoding-parsing a URL given the data attribute's value, relative to the element's node document.
  8. ~IF[ %~URL ~EQ `失敗^i ] ⇒# `~eventを発火する$( %object, `error$et ); ~GOTO `~fallback$i ◎ If url is failure, then fire an event named error at the element and jump to the step below labeled fallback.
  9. %要請 ~LET 新たな`要請$ — その ⇒# `~URL$rq ~SET %~URL, `~client$rq ~SET %object の`~node文書$に`関連な設定群~obj$, `行先$rq ~SET `object^l, `資格証~mode$rq ~SET `include^l, `~mode$rq ~SET `navigate^l, `起動元~種別$rq ~SET `object^l, `~URL資格証を利用するか$rq ~SET ~T ◎ Let request be a new request whose URL is url, client is the element's node document's relevant settings object, destination is "object", credentials mode is "include", mode is "navigate", initiator type is "object", and whose use-URL-credentials flag is set.
  10. %要請 を`~fetchする$ ◎ Fetch request.

    資源の~fetchingは、[ 資源が~fetchされ,`~network用~task~source$から`~queueされ$る`~task$(次の段を見よ)が走る ]まで, %object の`~node文書$の`~load~eventを遅延する$モノトスル。 ◎ Fetching the resource must delay the load event of the element's node document until the task that is queued by the networking task source once the resource has been fetched (defined next) has been run.

    【 以下に現れる “資源” は、 ~fetchして得られることになる資源を指す。 】

  11. ~IF[ 資源は まだ可用でない(例:資源は~cache内に可用でなかったので、 資源を読込むためには~network越しに要請を為すことが要求される) ] ⇒ ~GOTO `~fallback$i — ただし ⇒ `~network用~task~source$から`~queueされ$た`~task$は、 資源が可用になり次第,この~algoをこの段から開始し直すモノトスル。 資源は増分的に読込める — ~UAは資源の処理を始めるに十分な~dataが得られ次第、 資源を “可用” と見なしてヨイ。 【! opt to 】 ◎ If the resource is not yet available (e.g. because the resource was not available in the cache, so that loading the resource required making a request over the network), then jump to the step below labeled fallback. The task that is queued by the networking task source once the resource is available must restart this algorithm from this step. Resources can load incrementally; user agents may opt to consider a resource "available" whenever enough data has been obtained to begin processing the resource.
  12. ~IF[ 資源を読込むのに失敗した(例: ~HTTP 404 ~error / ~DNS~errorが生じた) ] ⇒# `~eventを発火する$( %object, `error$et ) ~GOTO `~fallback$i ◎ If the load failed (e.g. there was an HTTP 404 error, there was a DNS error), fire an event named error at the element, then jump to the step below labeled fallback.
  13. %資源~型 ~LET 次の手続きを走らせた結果: ◎ Determine the resource type, as follows:

    1. %Content-Type ~LET [ 資源には `~Content-Type~metadata$が結付けられているならば それが指定する型 / ~ELSE_ ε ] ◎ ↓
    2. ~IF[ ~UAは この資源に対しては、 `Content-Type^h ~headerを厳密に順守するよう環境設定されている ]~AND[ %Content-Type ~NEQ ε ] ⇒ ~RET %Content-Type ◎ Let the resource type be unknown. ◎ If the user agent is configured to strictly obey Content-Type headers for this resource, and the resource has associated Content-Type metadata, then let the resource type be the type specified in the resource's Content-Type metadata, and jump to the step below labeled handler.

      これは、 次のようなときに脆弱性をもたらし得る: ある~siteが特定0の内容~型が利用される 【ものと期待して,~pageに】 資源を埋込もうとしたが、 ~remote~siteはそれを上書きして,代わりに[ ~security特性が異なる,別の型の内容 ]を誘発させる資源を~UAに~~供給したときに。 ◎ This can introduce a vulnerability, wherein a site is trying to embed a resource that uses a particular type, but the remote site overrides that and instead furnishes the user agent with a resource that triggers a different type of content with different security characteristics.

    3. ~IF[ %Content-Type ~NEQ ε ]: ◎ Run the appropriate set of steps from the following list: ◎ If the resource has associated Content-Type metadata

      1. %~binaryか ~LET ~IS ~OR↓:

        • [ %Content-Type ~EQ `text/plain$mt ]~AND[ 資源に`~textか~binaryかを判別する規則$を適用した結果 ~NEQ `text/plain$mt ]
        • %Content-Type ~EQ `application/octet-stream$mt
        ◎ Let binary be false. ◎ If the type specified in the resource's Content-Type metadata is "text/plain", and the result of applying the rules for distinguishing if a resource is text or binary to the resource is that the resource is not text/plain, then set binary to true. ◎ If the type specified in the resource's Content-Type metadata is "application/octet-stream", then set binary to true.
      2. ~IF[ %~binaryか ~EQ ~F ] ⇒ ~RET %Content-Type ◎ If binary is false, then let the resource type be the type specified in the resource's Content-Type metadata, and jump to the step below labeled handler.
      3. ~IF[ %type ~NIN { ε, `application/octet-stream$mt } ]: ◎ If there is a type attribute present on the object element, and its value is not application/octet-stream, then run the following steps:

        1. ~IF[ %type は `image/^l から開始している ]~AND[ %type は`~XML~MIME型$ではない ] ⇒ ~RET %type ◎ If the attribute's value is a type that starts with "image/" that is not also an XML MIME type, then let the resource type be the type specified in that type attribute.
        2. ~RET `未知^i ◎ Jump to the step below labeled handler.
    4. ~ELSE: ◎ Otherwise, if the resource does not have associated Content-Type metadata

      1. ~IF[ %type ~EQ ε ] ⇒ %type ~SET 資源に`算出された~MIME型$ ◎ If there is a type attribute present on the object element, then let the tentative type be the type specified in that type attribute. ◎ Otherwise, let tentative type be the computed type of the resource.
      2. ~IF[ %type ~NEQ `application/octet-stream$mt ] ⇒ ~RET %type ◎ If tentative type is not application/octet-stream, then let resource type be tentative type and jump to the step below labeled handler.
    5. %資源~URL ~LET `~URL構文解析する$( 資源の(~redirect後の)~URL ) ◎ If applying the URL parser algorithm to the URL of the specified resource (after any redirects)\
    6. ~IF[ %資源~URL ~NEQ `失敗^i ]~AND[ %資源~URL の`~path$urlは ある`~plugin$ %~plugin が~supportする~patternに合致する ] ⇒ ~RET %~plugin が取扱える型 ◎ results in a URL record whose path component matches a pattern that a plugin supports, then let resource type be the type that that plugin can handle.

      例えば,ある~pluginは、[ `~path$url 成分が文字列 `.swf^l で終端する ]ような資源を取扱えるものとしていることもある。 ◎ For example, a plugin might say that it can handle resources with path components that end with the four character string ".swf".

    7. ~RET `未知^i ◎ It is possible for this step to finish, or for one of the substeps above to jump straight to the next step, with resource type still being unknown. In both cases, the next step will trigger fallback.
  14. ~IF[ %資源~型 ~EQ `未知^i ] ⇒ ~GOTO `~fallback$i ◎ ↑↓
  15. 次のうち, %資源~型 が最初に満たす条件に応じて、 対応する段に従って資源の内容を取扱う: ◎ Handler: Handle the content as given by the first of the following cases that matches:

    %資源~型 は`~XML~MIME型$である: ◎ ↓
    %資源~型 は `image/^l から開始していない: ◎ If the resource type is an XML MIME type, or if the resource type does not start with "image/"
    1. %~navigable ~LET %object の`内容~navigable$ ◎ ↓
    2. ~IF[ %~navigable ~EQ ~NULL ] ⇒ %~navigable ~SET `新たな子~navigableを作成する$( %object ) ◎ If the object element's content navigable is null, then create a new child navigable for the element.
    3. %応答 ~LET 上の`~fetch$から得られた`応答$ ◎ Let response be the response from fetch.
    4. ~IF[ %応答 の`~URL$rsは`~about_blank に合致して$いない ] ⇒ `~navigableを~URLへ~navigateする$( %~navigable, %応答 の`~URL$rs, %object の`~node文書$ ) — 次も与える下で ⇒# `履歴~取扱い^i ~SET `replace$hH ◎ If response's URL does not match about:blank, then navigate the element's content navigable to response's URL using the element's node document, with historyHandling set to "replace".

      注記: %object の `data$aO 属性は、 %~navigable が更に他の所在に`~navigate$されても更新されない。 ◎ The data attribute of the object element doesn't get updated if the content navigable gets further navigated to other locations.

    5. この時点で、 %object は,自身の`内容~navigable$を`表現-$する。 ◎ The object element represents its content navigable.
    ( %資源~型 は `image/^l から開始していて,) 画像の~supportは不能化されていない: ◎ If the resource type starts with "image/", and support for images has not been disabled
    1. `子~navigableを破壊する$( %object ) ◎ Destroy a child navigable given the object element.
    2. `画像を特定的に~sniffするための規則$を適用して,画像の型を決定する ◎ Apply the image sniffing rules to determine the type of the image.
    3. この時点で、 %object は指定された画像を`表現-$する ◎ The object element represents the specified image.
    4. ~IF[ 画像を具現化できない(例:~dataは~~不正な形式である/その形式は未~supportである,など) ] ⇒ ~GOTO `~fallback$i 【前~段の “画像を表現する” を上書きすることになる。】 ◎ If the image cannot be rendered, e.g. because it is malformed or in an unsupported format, jump to the step below labeled fallback.
    その他( %資源~型 は~supportされていない): ◎ Otherwise
    ~GOTO `~fallback$i ◎ The given resource type is not supported. Jump to the step below labeled fallback. ◎ If the previous step ended with the resource type being unknown, this is the case that is triggered.
  16. この時点で, %object の内容は %object が表現するものの一部を成さないとされる ◎ The element's contents are not part of what the object element represents.
  17. ~IF[ %object は自身の`内容~navigable$を表現していない ]:

    1. 資源が完全に読込まれた時点で,次を行うようにしておく ⇒ 次を走らす`要素~taskを~queueする$( `~DOM操作~task~source$, %object ) ⇒ `~eventを発火する$( %object, `load$et )
    ◎ If the object element does not represent its content navigable, then once the resource is completely loaded, queue an element task on the DOM manipulation task source given the object element to fire an event named load at the element.

    注記: %object は自身の`内容~navigable$を`表現して^emいる場合、 作成された`文書$が `読込ngを完全に終えた@~HTMLlifecycle#completely-finish-loading$とき,相似的な~taskが~queueされることになる。 ◎ If the element does represent its content navigable, then an analogous task will be queued when the created Document is completely finished loading.

  18. ~RET ◎ Return.
  19. `~fallback@i: ◎ Fallback:\

    1. この時点で、 %object は,その子~群を`表現-$する — それが %object の`~fallback内容$になる ◎ The object element represents the element's children. This is the element's fallback content.\
    2. `子~navigableを破壊する$( %object ) ◎ Destroy a child navigable given the element.

`object$e 要素の内容は、[ 上の~algoに因り,参照した資源を示せない場合(例:404~errorが返されたなど) ]に限り,利用される`~fallback内容$として動作する。 これにより、 複数の `object$e 要素を入子にすれば,能力が相異なる複数の~UAを対象にできるようになる — ~UAは,自身が~supportする最初のものを選ぶことになる。 ◎ Due to the algorithm above, the contents of object elements act as fallback content, used only when referenced resources can't be shown (e.g. because it returned a 404 error). This allows multiple object elements to be nested inside each other, targeting multiple user agents with different capabilities, with the user agent picking the first one it supports.

`object$e 要素は、 `~load~eventを遅延し得る$とする。 ◎ The object element potentially delays the load event.

`form$a 属性は、 `object$e 要素の`~form所有者$を明示的に指定するために利用される。 ◎ The form attribute is used to explicitly associate the object element with its form owner.

`object$e 要素は、 `寸法~属性$を~supportする。 ◎ The object element supports dimension attributes.

`data@mO ~IDL属性は、 `data$aO 内容~属性を`反映する$モノトスル。

`type@mO ~IDL属性は、 `type$aO 内容~属性を`反映する$モノトスル。

`name@mO ~IDL属性は、 `name$aO 内容~属性を`反映する$モノトスル。

◎ The IDL attributes data, type, and name each must reflect the respective content attributes of the same name.
`contentDocument@mO 取得子~手続きは ⇒ ~RET コレの`内容~文書$ ◎ The contentDocument getter steps are to return this's content document.
`contentWindow@mO 取得子~手続きは ⇒ ~RET コレの`内容~window$ ◎ The contentWindow getter steps are to return this's content window.

次の例の~HTML~pageは、 `object$e 要素を用いて,別の~pageを埋込んでいる。 ◎ In this example, an HTML page is embedded in another using the object element.

`object-2^xCode

4.8.8. 〜 4.8.14.

【 これらの節の和訳は `別~page(画像~関連)@~HEimages#_toc$ / `別~page(~media要素)@~HEmedia#_toc$ にて。 】

4.8.15. ~MathML

~MathML `math$e 要素は、 この仕様における内容~modelの目的においては,[ `埋込d内容$ / `句ng内容$ / `~flow内容$ / `可触~内容$ ]に分類される。 ◎ The MathML math element falls into the embedded content, phrasing content, flow content, and palpable content categories for the purposes of the content models in this specification.

~MathML `annotation-xml$e 要素が包含する,`~HTML名前空間$に属する要素は、 `~flow内容$でなければナラナイ。 ◎ When the MathML annotation-xml element contains elements from the HTML namespace, such elements must all be flow content.

~HTML要素の子孫である~MathML~token要素( `mi$e / `mo$e / `mn$e / `ms$e / `mtext$e )は、 `~HTML名前空間$に属する要素のうち,`句ng内容$を包含してもヨイ。 ◎ When the MathML token elements (mi, mo, mn, ms, and mtext) are descendants of HTML elements, they may contain phrasing content elements from the HTML namespace.

~UAは、 ~MathMLの[ 内容~model, ~layout, 具現化 ]の目的においては,[[ ~MathML要素のうち,自身の内容~modelが直の~textを許容しないもの ]内に見出された,`要素間~空白$でない~text ]を[ 実際には ~MathML `mtext$e 要素が当の~textを包装しているように装う ]ことにより,取扱うモノトスル。 (しかしながら、 そのような~textは適合しない。) ◎ User agents must handle text other than inter-element whitespace found in MathML elements whose content models do not allow straight text by pretending for the purposes of MathML content models, layout, and rendering that the text is actually wrapped in a MathML mtext element. (Such text is not, however, conforming.)

~UAは、 ~MathMLの[ ~layout, 具現化 ]の目的においては,[ ~MathML要素のうち,その内容が自身の内容~modelに合致しないもの ]に対しては[ 何らかの適切な~error~messageを包含している,~MathML `merror$e 要素に置換されていた ]かのように動作するモノトスル。 ◎ User agents must act as if any MathML element whose contents does not match the element's content model was replaced, for the purposes of MathML layout and rendering, by a MathML merror element containing some appropriate error message.

~MathML要素の意味論は、 `MathML^cite `MATHMLCORE$r, および他の`適用-可能な仕様$にて定義される。 ◎ The semantics of MathML elements are defined by MathML and other applicable specifications. [MATHML]

~HTML文書~内での~MathMLの利用~例: ◎ Here is an example of the use of MathML in an HTML document:

`mathml-1^xCode

4.8.16. ~SVG

~SVG `svg$e 要素は、 この仕様における内容~modelの目的においては,[ `埋込d内容$ / `句ng内容$ / `~flow内容$ / `可触~内容$ ]に分類される。 ◎ The SVG svg element falls into the embedded content, phrasing content, flow content, and palpable content categories for the purposes of the content models in this specification.

~SVG `foreignObject$e 要素が包含する要素のうち,`~HTML名前空間$に属するものは、 `~flow内容$でなければナラナイ。 ◎ When the SVG foreignObject element contains elements from the HTML namespace, such elements must all be flow content.

`~HTML文書$の内側における~SVG `title@~SVGstruct#elementdef-title$e 要素の内容~modelは、 `句ng内容$とする(これは、 `SVG 2^cite が課す要件を更に拘束する)。 ◎ The content model for the SVG title element inside HTML documents is phrasing content. (This further constrains the requirements given in SVG 2.)

~SVG要素の意味論は、 `SVG 2^cite `SVG$r と他の`適用-可能な仕様$にて定義される。 ◎ The semantics of SVG elements are defined by SVG 2 and other applicable specifications. [SVG]


%doc = %iframe.`getSVGDocument()$m
%doc = %embed.`getSVGDocument()$m
%doc = %object.`getSVGDocument()$m
[ `iframe$e / `embed$e / `object$e ]要素が~SVGを埋込むために利用されている事例では、 `Document$I ~objを返す。 ◎ Returns the Document object, in the case of iframe, embed, or object elements being used to embed SVG.

`getSVGDocument()@m ~method手続きは: ◎ The getSVGDocument() method steps are:

  1. %文書 ~LET コレの`内容~文書$ ◎ Let document be this's content document.
  2. ~IF[ %文書 ~EQ ~NULL ] ⇒ ~RET ~NULL ◎ ↓
  3. ~RET [ %文書 は次に該当するならば %文書 / ~ELSE_ ~NULL ] ⇒ %文書 は,`§ ~XML文書の読込n法@~HTMLlifecycle#read-xml$に従って作成されたものである (`~navigate$した際に,資源に`算出された~MIME型$は `image/svg+xml$mt であったので) ◎ If document is non-null and was created by the page load processing model for XML files section because the computed type of the resource in the navigate algorithm was image/svg+xml, then return document. ◎ Return null.

4.8.17. 寸法~属性

作者~要件 ◎ Author requirements:\

次に挙げる要素に対しては、[ `width@a / `height@a ]属性を指定してもヨイ ⇒# `img$e, `iframe$e, `embed$e, `object$e, `video$e, `source$e のうち その親は `picture$e 要素であるもの, `input$e のうち その `type$a 属性は `Image$st 状態にあるもの ◎ The width and height attributes on img, iframe, embed, object, video, source when the parent is a picture element and, when their type attribute is in the Image Button state, input elements may be specified\

これらの属性は、 要素の視覚的な内容の寸法を`~CSS~pixel$単位で与える(順に,出力~mediaの名目上の方向に相対的な[ 横幅, 縦幅 ]を与える)。 両~属性とも、 指定する値は`妥当な負でない整数$でなければナラナイ。 ◎ to give the dimensions of the visual content of the element (the width and height respectively, relative to the nominal direction of the output medium), in CSS pixels. The attributes, if specified, must have values that are valid non-negative integers.

指定する寸法は、 資源~自身に指定されている寸法から相違してもヨイ — 資源の解像度は`~CSS~pixel$の解像度から相違することもあるので。 (`~CSS~pixel$の解像度は、 ~screen上では 96ppi になるが,一般には 読み取り距離に依存する。) 両~属性とも指定する場合、 ~OR↓ を満たさなければナラナイ: ◎ The specified dimensions given may differ from the dimensions specified in the resource itself, since the resource may have a resolution that differs from the CSS pixel resolution. (On screens, CSS pixels have a resolution of 96ppi, but in general the CSS pixel resolution depends on the reading distance.) If both attributes are specified, then one of the following statements must be true:

  • %W ~MINUS 0.5 ~LTE %H ~DIV %iH ~MUL %iW ~LTE %W ~PLUS 0.5 ◎ specified width - 0.5 ≤ specified height * target ratio ≤ specified width + 0.5
  • %H ~MINUS 0.5 ~LTE %W ~DIV %iW ~MUL %iH ~LTE %H ~PLUS 0.5 ◎ specified height - 0.5 ≤ specified width / target ratio ≤ specified height + 0.5
  • %H ~EQ %W ~EQ 0 ◎ specified height = specified width = 0

— ここで、 %W, %H は,順に `width$a, `height$a 属性の値とする。 %iW, %iH は,順に資源の[ `生来な横幅$, `生来な縦幅$ ]とする。 ◎ The target ratio is the ratio of the natural width to the natural height in the resource. The specified width and specified height are the values of the width and height attributes respectively.

当の資源が`生来な横幅$も`生来な縦幅$も持たない場合、 両~属性とも省略しなければナラナイ。 ◎ The two attributes must be omitted if the resource in question does not have both a natural width and a natural height.

両~属性とも値が 0 の場合、 要素は 利用者~向けに意図されていないことを指示する (例:~pageが見られた回数を数える~service用途など)。 ◎ If the two attributes are both 0, it indicates that the element is not intended for the user (e.g. it might be a part of a service to count page views).

注記: これらの寸法~属性には、 画像を伸張する用途は意図されていない。 ◎ The dimension attributes are not intended to be used to stretch the image.

~UA要件 ◎ User agent requirements:\

~UAには、[ `width$a, `height$a ]属性を`具現化~用~hintに利用する@~HTMLrendering#dimRendering$ことが期待される。 ◎ User agents are expected to use these attributes as hints for the rendering.

[ `iframe$e / `embed$e / `object$e / `source$e / `video$e ]要素の:

  • `width@m ~IDL属性は、 `width$a 内容~属性を`反映する$モノトスル。
  • `height@m ~IDL属性は、 `height$a 内容~属性を`反映する$モノトスル。
◎ The width and height IDL attributes on the iframe, embed, object, source, and video elements must reflect the respective content attributes of the same name.

各 `iframe$e 要素には `処理待ちな資源~計時の開始~時刻@ が結付けられる — それは、[ ~NULL / `DOMHighResTimeStamp$I ]をとり, 初期~時は ~NULL に設定される。 ◎ Each iframe element has an associated null or DOMHighResTimeStamp pending resource-timing start time, initially set to null.

注記: これらの~IDL属性の型は、[ `iframe$e / `embed$e / `object$e ]に対しては `DOMString^I であるが,[ `video$e / `source$e ]に対しては `unsigned long^I である。 ◎ For iframe, embed and object the IDL attributes are DOMString; for video and source the IDL attributes are unsigned long.

注記: [ `img$e / `input$e ]要素~上の対応する~IDL属性は、 各~要素の節にて定義される — それらには、 それらの要素の他の挙動に特有な~~面が少しばかりあるので。 ◎ The corresponding IDL attributes for img and input elements are defined in those respective elements' sections, as they are slightly more specific to those elements' other behaviors.