【この訳に固有の表記規約】

この訳の,~algoの記述に利用されている各種記号(ε, 此れ, ~LET, ~IF, ~RET, 等々)の意味や定義の詳細は、~SYMBOL_DEF_REFを~~参照されたし。

4.8.5. `iframe^e 要素

`分類$
`~flow内容$/`句内容$/`埋込みの内容$/`対話的~内容$/`可触~内容$ ◎ Flow content. ◎ Phrasing content. ◎ Embedded content. ◎ Interactive content. ◎ Palpable content.
`この要素を利用できる文脈$
`埋込みの内容$が期待される所。 ◎ 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 — `入子にしている閲覧文脈$の名前 ◎ name — Name of nested browsing context
`sandbox$aF — 入子にされる内容に対する保安~規則 ◎ sandbox — Security rules for nested content
`allow$aF — `iframe$e の内容に適用されることになる`特色機能~施策$ ◎ allow — Feature 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()
`allowpaymentrequest$aF — `iframe$e の内容が `PaymentRequest$I ~interfaceを利用して,~payment要請を発行するのを許容するかどうか ◎ allowpaymentrequest — Whether the iframe's contents are allowed to use the PaymentRequest interface to make payment requests
`allowusermedia$aF — `iframe$e の内容が `getUserMedia()$m を利用するのを許容するかどうか ◎ allowusermedia — Whether to allow the iframe's contents to use getUserMedia()
`width$a — 横~寸法 ◎ width — Horizontal dimension
`height$a — 縦~寸法 ◎ height — Vertical dimension
`referrerpolicy$aF — この要素により起動された`~fetch$用の`~referrer施策$ ◎ referrerpolicy — Referrer policy for fetches initiated by the element
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$]
interface `HTMLIFrameElement@I : `HTMLElement$I {
  [`CEReactions$] attribute USVString `src$mF;
  [`CEReactions$] attribute DOMString `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 boolean `allowPaymentRequest$mF;
  [`CEReactions$] attribute boolean `allowUserMedia$mF;
  [`CEReactions$] attribute DOMString `width$m;
  [`CEReactions$] attribute DOMString `height$m;
  [`CEReactions$] attribute DOMString `referrerPolicy$mF;
  readonly attribute `Document$I? `contentDocument$mF;
  readonly attribute `WindowProxy$I? `contentWindow$mF;
  `Document$I? `getSVGDocument$m();
};

`iframe$e 要素は、自身が`入子にしている閲覧文脈$を`表現-$する。 ◎ The iframe element represents a nested browsing context.

`src@aF 属性は、`入子の閲覧文脈$が包含することになる頁の`~URL$を与える。 この属性が在する場合の値は、`前後~空白~可の妥当かつ空でない~URL$で~MUST。 `iframe$e 要素が `itemprop$a 属性を有する場合、この属性も有してい~MUST。 ◎ The src attribute gives the URL of a page that the nested browsing context 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 属性は、`入子の閲覧文脈$が包含することになる内容を与える。 この属性の値が `~iframe-srcdoc文書@ の~sourceを与える。 ◎ The srcdoc attribute gives the content of the page that the nested browsing context is to contain. The value of the attribute is the source of an iframe srcdoc document.

`srcdoc$aF 属性に指定する値は、次に与える順による構文単位からなる`~HTML構文$を利用する値にされ~MUST: ◎ 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. 任意~個数の[ `~comment$syn, `~ASCII空白$ ] ◎ Any number of comments and ASCII whitespace.
  2. 0 〜 1 個の `~DOCTYPE$ ◎ Optionally, a DOCTYPE.
  3. 任意~個数の[ `~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. 任意~個数の[ `~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は省略可能 であり(省略されても,依然として暗黙に在する), `~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 要素 %iframe が`文書の中へ挿入され$たときは、[ 文書が`属する閲覧文脈$ ~NEQ ε ]ならば,~UAは次を走らせ~MUST: ◎ When an iframe element is inserted into a document that has a browsing context, the user agent must\

  1. %B ~LET `新たな閲覧文脈を作成する$() ◎ create a new browsing context,\
  2. %iframe が`入子にしている閲覧文脈$ ~SET %B ◎ set the element's nested browsing context to the newly-created browsing context, and then\
  3. `~iframeの属性を処理する$( %iframe, `初回^i ) ◎ process the iframe attributes for the "first time".

`iframe$e 要素 %iframe が`入子にしている閲覧文脈$ %B ~NEQ ~NULL の下では、~UAは,次に従わ~MUST: ◎ ↓

~UAは, `~iframeの属性を処理する@ ときは、所与の ( `iframe$e 要素 %iframe, %初回~flag ~IN { `初回^i, ε }(省略時は ε ) ) に対し,次を走らせ~MUST: ◎ When the user agent is to process the iframe attributes, it must run the first appropriate steps from the following list:

  1. %B ~LET %iframe が`入子にしている閲覧文脈$ ◎ ↓
  2. ~IF[ %iframe は `srcdoc$aF 属性を有する ]:

    1. %応答 ~LET 次のようにされた新たな`応答$ ⇒# `~url~list$rs ~SET `about_srcdoc$sc のみからなる~list, `~header~list$rs ~SET ( `Content-Type^h / `text/html$mt ) のみからなる~list, `本体$rs ~SET その属性~値, `~CSP~list$rs ~SET %iframe の`~node文書$の`~CSP~list$doc, `~HTTPS状態$rs ~SET %iframe の`~node文書$の`~HTTPS状態$doc
    2. %B を %応答 へ`~navigate$する
    3. ~RET
    ◎ If the srcdoc attribute is specified ◎ Navigate the element's nested browsing context to a new response whose url list consists of about:srcdoc, header list consists of `Content-Type`/`text/html, body is the value of the attribute, CSP list is the CSP list of the iframe element's node document, HTTPS state is the HTTPS state of the iframe element's node document.

    上による結果の`文書$は、`~iframe-srcdoc文書$と見なされ~MUST。 ◎ The resulting Document must be considered an iframe srcdoc document.

  3. ~IF[ %iframe は `src$aF 属性を有さない ]~AND[ %初回~flag ~NEQ ε ] ⇒ `~DOM操作~task源$から,次を走らす`~taskを~queueする$ ⇒ `~iframe~load~event手続き$ ◎ Otherwise, if the element has no src attribute specified, and the user agent is processing the iframe's attributes for the "first time" ◎ Queue a task to run the iframe load event steps. ◎ The task source for this task is the DOM manipulation task source.
  4. ~ELSE: ◎ Otherwise ◎ Run the otherwise steps for iframe or frame elements. ◎ The otherwise steps for iframe or frame elements are as follows:

    1. %~url ~LET `~URL$ `about_blank$sc ◎ ↓
    2. ~IF[ %iframe は `src$aF 属性を有する ]~AND[ その値 %src ~NEQ 空~文字列 ]:

      1. %src ~SET %src を %iframe の`~node文書$に`相対的に構文解析-$した`結果の~URL~record$
      2. ~IF[ %src ~NEQ ~error ] ⇒ %~url ~SET %src
      ◎ If the element has no src attribute specified, or its value is the empty string, let url be the URL "about:blank". ◎ Otherwise, parse the value of the src attribute, relative to the element's node document. ◎ If that is not successful, then let url be the URL "about:blank". Otherwise, let url be the resulting URL record.
    3. ~IF[ %B のある`先祖~閲覧文脈$にて`作動中の文書$の`~URL$docは,`素片$urlは無視して %~url に等しい【`同等$url?】 ] ⇒ ~RET ◎ If there exists an ancestor browsing context whose active document's URL, ignoring fragments, is equal to url, then return.
    4. %資源 ~LET 次のようにされた新たな`要請$ ⇒# `~url$rq ~SET %~url, `~referrer施策$rq ~SET %iframe の `referrerpolicy$aF 内容~属性の現在の状態 ◎ Let resource be a new request whose url is url and whose referrer policy is the current state of the element's referrerpolicy content attribute.
    5. %B を %資源 へ`~navigate$する ◎ Navigate the element's nested browsing context to resource.

    【 この一連の段は,原文では iframe または frame 要素に対する他の場合の手続き として別に定義されているが(すなわち, `frame^e 要素からも利用されると見受けられる)、この訳では,この手続きに統合することにする(廃用にされた `frame^e 要素を和訳するつもりはないので)。 】

[ `iframe$e 要素 %iframe を与える下で,`~iframeの属性を処理する$ ]ときに,~UAに要求される`~navi$においては: ◎ Any navigation required of the user agent in the process the iframe attributes algorithm\

`iframe$e 内の`文書$が`完全に読込済み$とされた時点で、~UAは,`~iframe~load~event手続き$を走らせ~MUST。 ◎ When a Document in an iframe is marked as completely loaded, the user agent must run the iframe load event steps.

注記: `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読込中~flag@, `~iframe読込黙秘中~flag@ を持つ — いずれも,`文書$の作成-時には ~OFF にされ~MUST。 ◎ 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 に対し,次を走らす: ◎ The iframe load event steps are as follows:

  1. %子~文書 ~LET %iframe が`入子にしている閲覧文脈$にて`作動中の文書$ (この時点では~NULLになり得ない。) ◎ Let child document be the active document of the iframe element's nested browsing context (which cannot be null at this point).
  2. ~IF[ %子~文書 の `~iframe読込黙秘中~flag$ ~EQ ~ON ] ⇒ ~RET ◎ If child document has its mute iframe load flag set, return.
  3. %子~文書 の`~iframe読込中~flag$ ~SET ~ON ◎ Set child document's iframe load in progress flag.
  4. %iframe に向けて,名前 `load$et の`~eventを発火する$ ◎ Fire an event named load at the iframe element.
  5. %子~文書 の`~iframe読込中~flag$ ~SET ~OFF ◎ Unset child document'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.

`iframe$e 要素が`入子にしている閲覧文脈$ %B (~NEQ ~NULL )にて`作動中の文書$ %文書 に対し,次のいずれかが満たされている間は、要素は %文書 の`~load~eventを遅延-$し~MUST:

  • %文書 の`読込後~taskは準備済み$でない
  • 要素 内の何かが, %文書 の`~load~eventを遅延-$している
  • %B は`~load~event遅延-中~mode$下にある
◎ When the iframe's browsing context's active document is not ready for post-load tasks, and when anything in the iframe is delaying the load event of the iframe's browsing context's active document, and when the iframe's browsing context is in the delaying load events mode, the iframe must delay the load event of its document.

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

注記: %iframe の作成-時に,[ `srcdoc$aF 属性を有してなかった ]~AND[ `src$aF 属性を有してなかったか, 有していたが その値を`相対的に構文解析-$できなかった ]場合、 %B は,初期 `about_blank$sc 頁のままにされることになる。 ◎ 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 browsing context will remain at the initial about:blank page.

注記: 利用者がこの頁から他所へ`~navigate$した場合、 %B の `WindowProxy$I ~objは,新たな`文書$~用の新たな `Window$I ~objを代理することになるが、 %iframe の `src$aF 属性は変更されない。 ◎ If the user navigates away from this page, the iframe's corresponding WindowProxy object will proxy new Window objects for new Document objects, but the src attribute will not change.


`name@aF 属性は、在するならば, `iframe$e 要素 %iframe が`入子にしている閲覧文脈$ %B に名前を与えるために利用される。 この属性に指定する値は、`妥当な閲覧文脈~名$で~MUST。 %B の`閲覧文脈~名$は: ◎ The name attribute, if present, must be a valid browsing context name. The given value is used to name the nested browsing context.\


`iframe$e 要素に `sandbox@aF 属性が指定された場合、要素が~hostする内容に対し,~~追加の制約の集合を可能化する。 指定する値は、[ `~ASCII大小無視$の下で,`空白区切りの一意な~tokenからなる無順序~集合$ ]で~MUST。 下の表の 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-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, and allow-top-navigation-by-user-activation.

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

`sandbox$aF 属性に指定できる~keywordとその効果
~keyword 効果
`allow-same-origin$v 内容を一意な生成元の中に強制する代わりに,その実の生成元に属するものと扱われるようにする
`allow-top-navigation$v 内容が その`~top-level閲覧文脈$を`~navigate$できるようにする
`allow-top-navigation-by-user-activation$v `allow-top-navigation$v と同様に挙動するが、そのような`~navi$を `利用者による作動化により誘発され$るときに限り,許容する
`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化されない`補助~閲覧文脈$の作成を可能化する
◎ The allow-same-origin keyword causes the content to be treated as being from its real origin instead of forcing it into a unique origin; the allow-top-navigation keyword allows the content to navigate its top-level browsing context; the allow-top-navigation-by-user-activation keyword behaves similarly but only allows such navigation when triggered by user activation; 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. [POINTERLOCK] [SCREENORIENTATION] [PRESENTATION]

`allow-top-navigation$v, `allow-top-navigation-by-user-activation$v 両~keywordとも指定されては~MUST_NOT — そうすることは冗長なので。 そのような適合しない~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-scripts$v, `allow-same-origin$v 両~keywordとも設定することは、[ 埋込まれた頁と それを包含している `iframe$e とが`同一生成元$に属する ]ときには,[[ 埋込まれた頁が単純に `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 が`入子にしている閲覧文脈$が`~navigate$されるときに限られる。 すでに読込まれた頁に対しては、それらの一部を除去しようが `sandbox$aF 属性まるごと除去しようが,効果はない。 ◎ These flags only take effect when the nested browsing context of the iframe is navigated. Removing them, or removing the entire sandbox attribute, has no effect on an already-loaded page.

`iframe$e 要素を包含している~fileと同じ~serverは、敵対的になり得る~fileを~serveするべきでない。 敵対的な内容を~sandbox化することは、攻撃者が,[ `iframe$e 内ではなく,敵対的な内容へ直に訪問する ]よう利用者を仕向けれる場合のためにある、最低限の助けでしかない。 敵対的な~HTML内容がもたらし得る被害を制限するには、別々の専用~domainから~serveするべきである。 異なる~domainを利用すれば、利用者が `sandbox$aF 属性の保護なしに,そのような頁へ直に訪問するよう騙された場合でも,~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 において,次のいずれかが生じたときは、~UAは, ( `sandbox$aF 属性の値, 当の閲覧文脈の`~iframe~sandbox法~flag集合$ ) を ( %入力, %出力 ) に用いて,`~sandbox法~指令を構文解析-$し~MUST:

  • %iframe が `sandbox$aF 属性を有している下で ⇒ %iframe 用に`入子の閲覧文脈$が作成されたとき(かつ,初期 `about_blank$sc `文書$が作成される前)
  • [ %iframe が`入子にしている閲覧文脈$ ~NEQ ~NULL ]の下で ⇒ %iframe の`sandbox$aF 属性が[ 設定-/変更- ]されたとき
◎ When an iframe element with a sandbox attribute has its nested browsing context created (before the initial about:blank Document is created), and when an iframe element's sandbox attribute is set or changed while it has a nested browsing context, the user agent must parse the sandboxing directive using the attribute's value as the input and the iframe element's nested browsing context's iframe sandboxing flag set as the output.

[ `iframe$e 要素が`入子にしている閲覧文脈$ %B ~NEQ ~NULL ]の下で、要素の `sandbox$aF 属性が除去されたときは、~UAは, %B の`~iframe~sandbox法~flag集合$を空にし~MUST。 ◎ When an iframe element's sandbox attribute is removed while it has a non-null nested browsing context, the user agent must empty the iframe element's nested browsing context's iframe sandboxing flag set as the output.

この例では、頁~内には,利用者が供した ある[ 完全に未知で,敵対的にもなり得る~HTML内容 ]が埋込まれている。 それは,ある別々の~domainから~serveされているので、通常の~cross-site制約すべてから影響される。 加えて,埋込まれた頁では、[ ~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を利用することは、攻撃者が利用者を[ その頁に直に訪問させ、頁~内に見出されるどの攻撃からも脆弱にする ]よう仕向けても,[ 頁は~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 sandbox="allow-same-origin allow-forms allow-scripts"
        src="https://maps.example.com/embedded.html"></iframe>

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

<iframe sandbox="allow-same-origin allow-forms" src=%B></iframe>

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

<iframe sandbox="allow-scripts" src=%C></iframe>

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

<a href=%D>Link</a>

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

この局面における頁 %C に対しては、~sandbox法~flagすべてが ~ON にされる。 %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 の中に頁 %D を読込んだ場合、頁 %D は今や,[ %B 内の `iframe$e に[ `allow-same-origin$v, `allow-forms$v ]~keywordが設定されていた ]かのように動作する — それが、[ 頁%B が読込まれた時点で, %A 内の `iframe$e が`入子にしている閲覧文脈$の状態 ]であったので。 ◎ 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 nested browsing context 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 が`入子にしている閲覧文脈$に属する`文書$用の`特色機能~施策$doc ]が初期化されるときに,利用されることになる。 値は`直列形の特色機能~施策$で~MUST。 `FEATUREPOLICY$r ◎ The allow attribute, when specified, determines the container policy that will be used when the feature policy for a Document in the iframe's nested browsing context is initialized. Its value must be a serialized feature policy. [FEATUREPOLICY]

次の例では、~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 src="https://maps.example.com/" allow="geolocation"></iframe>

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

ここでの `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-3^xCode

`allowpaymentrequest@aF 属性は`真偽~属性$であり、指定されたときは,[ `iframe$e 要素の`閲覧文脈$に属する`文書$は、[ どの`生成元$からでも,~payment要請を発行して `payment^l 特色機能を利用することを許容する ]ように,`特色機能~施策$docで初期化されることになる ]ことを指示する。 これは、`特色機能~施策~属性を処理する$~algoにより施行される。 `FEATUREPOLICY$r ◎ The allowpaymentrequest attribute is a boolean attribute. When specified, it indicates that Document objects in the iframe element's browsing context will be initialized with a feature policy which allows the "payment" feature to be used to make payment requests from any origin. This is enforced by the Process feature policy attributes algorithm. [FEATUREPOLICY]

`allowusermedia@aF 属性は`真偽~属性$であり、指定されたときは,[ `iframe$e 要素の`閲覧文脈$に属する`文書$は、[ どの`生成元$からでも, `getUserMedia()$m を~callして[ `camera^l / `microphone^l ]特色機能を利用することを許容する ]ように,`特色機能~施策$docで初期化されることになる ]ことを指示する。 これは、`特色機能~施策~属性を処理する$~algoにより施行される。 `FEATUREPOLICY$r ◎ The allowusermedia attribute is a boolean attribute. When specified, it indicates that Document objects in the iframe element's browsing context will be initialized with a feature policy which allows the "camera" and "microphone" features to be used to call getUserMedia() from any origin. This is enforced by the Process feature policy attributes algorithm. [FEATUREPOLICY]

これらの[ `allow$aF / `allowfullscreen$aF / `allowpaymentrequest$aF / `allowusermedia$aF ]属性は、[ `iframe$e 要素の`~node文書$には、当の特色機能の利用は,すでに許容されていない ]場合には,`入子の閲覧文脈$における特色機能への~accessを是認することはない。 ◎ None of these attributes, allow, allowfullscreen, allowpaymentrequest or allowusermedia, can grant access to a feature in a nested browsing context if the iframe 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 ε ] ⇒ ~RET ~F ◎ If document has no browsing context, then return false.
  2. ~IF[ %文書 が`属する閲覧文脈$にて`作動中の文書$ ~NEQ %文書 ] ⇒ ~RET ~F ◎ If document's browsing context's active document is not document, then return false.
  3. ~IF[ `特色機能は施策により生成元~用に可能化されるか?$( %特色機能, %文書, %文書 の`生成元$ ) ~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 / `allowpaymentrequest$aF / `allowusermedia$aF ]属性が波及するのは,`入子の閲覧文脈$にて`作動中の文書$の`特色機能~施策$docに限られる — これらが効果を~~発揮するのは `iframe$e が`入子にしている閲覧文脈$が`~navigate$されるときに限られる。 属性を追加しようが除去しようが,すでに読込まれた文書に対する効果は無い。 ◎ Because they only influence the feature policy of the nested browsing context's active document, the allow, allowfullscreen, allowpaymentrequest and allowusermedia attributes only take effect when the nested browsing context of the iframe is navigated. Adding or removing them has no effect on an already-loaded document.


`iframe$e 要素は、埋込みの内容に特有の寸法がある場合は,`寸法~属性$を~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内容$は決してない — 指定された初期~内容が成功裡に利用されようがされまいが、それは常に,`入子の閲覧文脈$として`新たな閲覧文脈を作成する$ことになるので。 ◎ An iframe element never has fallback content, as it will always create a nested browsing context, 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]


`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
`srcdoc@mF
`name@mF
`sandbox@mF
`allow@mF
`allowFullscreen@mF
`allowPaymentRequest@mF
`allowUserMedia@mF
順に,(小文字~化した名前の)[ `src$aF, `srcdoc$aF, `name$aF, `sandbox$aF, `allow$aF, `allowfullscreen$aF, `allowpaymentrequest$aF, `allowusermedia$aF ]内容~属性を`反映-$し~MUST。 ◎ 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. ◎ The allowFullscreen IDL attribute must reflect the allowfullscreen content attribute. ◎ The allowPaymentRequest IDL attribute must reflect the allowpaymentrequest content attribute. ◎ The allowUserMedia IDL attribute must reflect the allowusermedia content attribute.
`sandbox$mF 属性が `DOMTokenList$I 用に`~supportする~token集合$は、[ `sandbox$aF 内容~属性に定義された許容される値のうち,~UAが~supportするもの ]からなるとする。 ◎ ↑
`referrerPolicy@mF
`既知の値のみに制限され$る下で, `referrerpolicy$aF 内容~属性を`反映-$し~MUST。 ◎ The referrerPolicy IDL attribute must reflect the referrerpolicy content attribute, limited to only known values.
`contentDocument@mF
取得子は、此れの`内容~文書$を返さ~MUST。 ◎ The contentDocument IDL attribute, on getting, must return the iframe element's content document.
`contentWindow@mF
取得子は、此れが`入子にしている閲覧文脈$ %B に応じて,[ ~NULL ならば ~NULL / ~ELSE_ %B の `WindowProxy$I ~obj ]を返さ~MUST。 ◎ The contentWindow IDL attribute must return the WindowProxy object of the iframe element's nested browsing context, if its nested browsing context is non-null, or null otherwise.

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

`iframe-4^xCode

4.8.6. `embed^e 要素

`分類$
`~flow内容$ / `句内容$ / `埋込みの内容$ /`対話的~内容$ / `可触~内容$ ◎ Flow content. ◎ Phrasing content. ◎ Embedded content. ◎ Interactive content. ◎ Palpable content.
`この要素を利用できる文脈$
`埋込みの内容$が期待される所。 ◎ 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).
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$]
interface `HTMLEmbedElement@I : `HTMLElement$I {
  [`CEReactions$] attribute USVString `src$mE;
  [`CEReactions$] attribute DOMString `type$mE;
  [`CEReactions$] attribute DOMString `width$m;
  [`CEReactions$] attribute DOMString `height$m;
  `Document$I? `getSVGDocument$m();
};

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

`embed$e 要素は、外部(概して~HTMLでない) ~appや対話的~内容~用に統合~~地点を供する。 ◎ The embed element provides an integration point for an external (typically non-HTML) application or interactive content.

`src@aE 属性は、埋込まれる資源の`~URL$を与える。 この属性に指定する値は、`前後~空白~可の妥当かつ空でない~URL$で~MUST。 ◎ 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 属性も有してい~MUST。 ◎ If the itemprop attribute is specified on an embed element, then the src attribute must also be specified.

`type@aE 属性は、在するならば`~MIME型$を与え、~instance化される~pluginは,それにより選定される。 指定する値は、`妥当な~MIME型~文字列$で~MUST。 要素が `type$aE, `src$aE 両 属性とも有する場合、 `type$aE 属性には,[ `src$aE 属性に与えられた資源 ]の[ 明示的な`~Content-Type~metadata$ ]と同じ型が指定され~MUST。 ◎ 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 要素が次のいずれかの条件を満たしている間は、要素に対し~instance化された`~plugin$は,除去され~MUST — 要素は何も`表現-$しなくなる: ◎ 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 要素に対し,次のいずれかが生じたときは、~UAは, `~embed~task源@ から,`~embed要素を設定しておく手続き$を走らす`~taskを~queueし$~MUST:

  • `作動中になれ$ない~~状態から`作動中になれ$るようになったとき
  • `作動中になれ$るまま,その[ `src$aE 属性, または `type$aE 属性 ]が[ 設定- / 変更- / 除去- ]されたとき
◎ 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 a task using the embed task source to run the embed element setup steps.

`~embed要素を設定しておく手続き@ は、所与の `embed$e 要素 %embed に対し,次を走らす: ◎ The embed element setup steps 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 this element, then return.
  3. ~IF[ `要素は~CSPにより先天的に阻止されるべきか?$( %embed ) `CSP$rの結果 ~EQ `阻止ed^i ] ⇒ ~RET ◎ If the Should element be blocked a priori by Content Security Policy? algorithm returns "Blocked" when executed on the element, then return. [CSP]
  4. ~UAは、この段を走らすべきである。 ◎ ↓

    ~IF[ %embed は `src$aE 属性を有する ]: ◎ If the element has a src attribute set

    1. %src ~LET %embed の `src$aE 属性の値を[ %embed の`~node文書$ ]に`相対的に構文解析-$した`結果の~URL~record$ ◎ The user agent must parse the value of the element's src attribute, relative to the element's node document.\
    2. ~IF[ %src ~EQ ~error ] ⇒ ~RET ◎ If that is successful, the user agent should run these steps:
    3. %要請 ~LET 次のようにされた新たな`要請$ ⇒# `~url$rq ~SET %src, `~client$rq ~SET %embed の`~node文書$の `Window$I ~objの`環境~設定群~obj$, `行先$rq ~SET `embed^l, `資格証~mode$rq ~SET `include^l, `~URL資格証~利用~flag$rq ~SET ~ON ◎ Let request be a new request whose url is the resulting URL record, client is the element's node document's Window object's environment settings object, destination is "embed", credentials mode is "include", and whose use-URL-credentials flag is set.
    4. %要請 を`~fetch$する — 加えて: ◎ Fetch request.

      資源が~fetchされ,`~network用~task源$から`~queueされ$た`~task$は、次の手続きを走らせ~MUST: ◎ The task that is queued by the networking task source once the resource has been fetched must run the following steps:

      1. ~IF[ %現~task より後に~queueされた,[ 同じ %embed に対し この手続きを走らす,別の`~task$ ]がある ] ⇒ ~RET ◎ If another task has since been queued to run the embed element setup steps for this element, then return.
      2. `内容の型@ ~LET 次の下位手続きを走らせた結果: ◎ Determine the type of the content being embedded, as follows (stopping at the first substep that determines the type):

        1. ~IF[ %embed は `type$aE 属性を有していて,その値は ある`~plugin$が~supportする型である ] ⇒ ~RET その属性~値 ◎ If the element has a type attribute, and that attribute's value is a type that a plugin supports, then the value of the type attribute is the content's type.
        2. %~url ~LET `~URL構文解析する$( 指定された資源の(~redirect後の)`~URL$ ) ◎ Otherwise, if applying the URL parser algorithm to the URL of the specified resource (after any redirects) results in a URL record\
        3. ~IF[ %~url ~NEQ `失敗^i ]~AND[ %~url の`~path$url 成分は ある`~plugin$が~supportする~patternに合致する ] ⇒ ~RET その~pluginが取扱える型 ◎ whose path component matches a pattern that a plugin supports, then the content's type is 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".

          【 ~patternに合致する複数の~pluginがある場合に,[ どの~pluginが選定されるか / 当の~pluginが複数の型を取扱える場合に,どの型が選定されるか ]については、ここには述べられていない(関連すると思しき記述は ~plugin節 にあるが、いずれにせよ,~UAや環境設定に基づく何らかの仕組みで選定されることが前提にある)。 他所にも~pluginを選定する記述があるが同様と思われる。 】

        4. ~IF[ 指定された資源には、明示的な`~Content-Type~metadata$がある ] ⇒ ~RET その~Content-Type ◎ Otherwise, if the specified resource has explicit Content-Type metadata, then that is the content's type.
        5. ~RET ε (内容には`内容の型$はなく,対する適切な`~plugin$はない) ◎ Otherwise, the content has no type and there can be no appropriate plugin for it.
      3. ~IF[ `内容の型$ ~EQ `image/svg+xml$mt ]: ◎ If the previous step determined that the content's type is image/svg+xml, then run the following substeps:

        1. %B ~LET %embed が`入子にしている閲覧文脈$ ◎ ↓
        2. ~IF[ %B ~EQ ~NULL ]:

          1. %B ~SET `新たな閲覧文脈を作成する$()
          2. %embed が`入子にしている閲覧文脈$ ~SET %B
          3. ~IF[ %embed は `name$a 属性を有する ] ⇒ %B の`閲覧文脈~名$ ~SET その属性の値
          ◎ If the embed element's nested browsing context is null, set the element's nested browsing context to a newly-created browsing context, and, if the element has a name attribute, set the browsing context name of the element's new nested browsing context to the value of this attribute.
        3. 次を与える下で, %B を~fetchされた資源へ`~navigate$する ⇒# `置換~可能化~flag$ ~SET ~ON, `~source閲覧文脈$ ~SET %embed の`~node文書$が`属する閲覧文脈$

          ( %embed の `src$aE 属性は、 %B が更に他の所在に~navigateされても更新されない。)

          ◎ Navigate the nested browsing context to the fetched resource, with replacement enabled, and with the embed element's node document's browsing context as the source browsing context. (The src attribute of the embed element doesn't get updated if the browsing context gets further navigated to other locations.)
        4. この時点で、 %embed は %B を`表現-$する ◎ The embed element now represents its nested browsing context.
      4. ~ELSE:

        1. %~plugin ~LET `内容の型$に基づいて適切な`~plugin$を見出して — なければ`既定の~plugin$とする — それを~instance化した結果 — %embed に対し以前に~instance化されていた~pluginがあれば それを置換する
        2. %~plugin に資源の内容を手渡す
        3. この時点で、 %embed は %~plugin を表現する
        ◎ Otherwise, find and instantiate an appropriate plugin based on the content's type, and hand that plugin the content of the resource, replacing any previously instantiated plugin for the element. The embed element now represents this plugin instance.

      加えて:

      • 資源または その~pluginが完全に読込まれた時点で、次を走らす`~taskを~queueする$ ⇒ %embed に向けて,名前 `load$et の`~eventを発火する$ ◎ Once the resource or plugin has completely loaded, queue a task to fire an event named load at the element.
      • 資源が成功裡に~fetchされたかどうか(例:その応答~statusは`~ok~status$であったかどうか)は、[ `内容の型$を決定する/ 資源を~pluginに手渡す ]ときには,無視され~MUST。 ◎ Whether the resource is fetched successfully or not (e.g. whether the response status was an ok status) must be ignored when determining the content's type and when handing the resource to the plugin.

        注記: これにより、~serverは, ~error応答においても~plugin用の~dataを返せるようになる(例: ~HTTP 500 Internal Server Error ~codeは、依然として ~plugin~dataを包含できる)。 ◎ 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).

      • 資源の~fetchingは、 %embed の`~node文書$の`~load~eventを遅延-$し~MUST。 ◎ Fetching the resource must delay the load event of the element's node document.
  5. ~UAは、この段を走らすべきである。 【上の “走らすべき” 段とこの段のうち,片方だけ走らすことにする~UAもあり得ることになる。】 ◎ ↓

    ~IF[ %embed は `src$aE 属性を有さない ]: ◎ If the element has no src attribute set

    1. %~plugin ~LET `type$aE 属性の値に基づいて 適切な`~plugin$を見出して — なければ`既定の~plugin$とする — それを~instance化した結果 ◎ The user agent should find and instantiate an appropriate plugin based on the value of the type attribute.\
    2. この時点で、 %embed は %~plugin を表現する ◎ The embed element now represents this plugin instance.
    3. %~plugin が完全に読込まれた時点で,次を走らす`~taskを~queueする$ようにしておく ⇒ %embed に向けて,名前 `load$et の`~eventを発火する$ ◎ Once the plugin is completely loaded, queue a task to fire an event named load at the element.

`embed$e 要素は、`~fallback内容$を持たない。 ~UAは、上の~algoにて相応しい~pluginを見出して~instance化しようと試みたときに見出せなかった場合, `既定の~plugin@ を利用し~MUST。 この既定は、単純に “未~supportの形式です” と~~述べるだけにすることもできる。 ◎ The embed element has no fallback content. If the user agent can't find a suitable plugin when attempting to find and instantiate one for the algorithm above, then the user agent must use a default plugin. This default could be as simple as saying "Unsupported Format".

`作動中になれ$る `embed$e 要素が,`作動中になれ$なくなったときは、要素に対し~instance化されていた`~plugin$は,未読込みにされ~MUST。 ◎ Whenever an embed element that was potentially active stops being potentially active, any plugin that had been instantiated for that element must be unloaded.

[ ~instance化されようとしている`~plugin$ %~plugin を`保安化-$できない ]~AND[ `閲覧文脈~sandbox化( ~plugin )~flag$ ~IN `embed$e 要素の`~node文書$の`作動中の~sandbox法~flag集合$ ]のときは、~UAは: ◎ When a plugin is to be instantiated but it cannot be secured and the sandboxed plugins browsing context flag is set on the embed element's node document's active sandboxing flag set, then\

`保安化-$できない~pluginは、~sandboxが課す制約を尊守しないかもしれないので,~sandbox化された閲覧文脈においては不能化される(例:さもなければ、~sandboxに対し~scriptingが不能化されていても,~scriptingが許容されるかもしれない)。 ~UAは、~sandboxを上書きすることの危険性を,そうする選択肢を供する場合には 利用者に伝えるべきである。 ◎ Plugins that cannot be secured are disabled in sandboxed browsing contexts because they might not honor the restrictions imposed by the sandbox (e.g. they might allow scripting even when scripting in the sandbox is disabled). User agents should convey the danger of overriding the sandbox to the user if an option to do so is provided.

`embed$e 要素が`入子にしている閲覧文脈$ %B (~NEQ ~NULL )にて`作動中の文書$ %文書 に対し,次のいずれかが満たされている間は、要素は %文書 の`~load~eventを遅延-$し~MUST:

  • %文書 の`読込後~taskは準備済み$でない
  • %文書 の`~load~eventを遅延-$している何かがある
  • %B は`~load~event遅延-中~mode$下にある
◎ When an embed element has a non-null nested browsing context: if the embed element's nested browsing context's active document is not ready for post-load tasks, and when anything is delaying the load event of the embed element's browsing context's active document, and when the embed element's browsing context is in the delaying load events mode, the embed must delay the load event of its document.

この節にて言及された`~task$の`~task源$は、 【他が指定されない限り】 `~DOM操作~task源$とする。 ◎ The task source for the tasks mentioned in this section is the DOM manipulation task source.

`embed$e 要素には、名前が次をすべて満たすような任意の属性が指定されてもよい:

  • `name$a, `align$a, `hspace$a, `vspace$a のいずれでもでない
  • どの名前空間にも属さない
  • `~XML互換$である
  • `~ASCII英大文字$を包含しない
◎ Any namespace-less attribute other than name, align, hspace, and vspace may be specified on the embed element, so long as its name is XML-compatible and contains no ASCII upper alphas.\

そのような属性は、`~plugin$への~parameterとして渡されることになる。 ◎ These attributes are then passed as parameters to the plugin.

注記: `~HTML文書$におけるすべての属性は、自動的に小文字~化されるので、大文字に対する制約は,そのような文書には影響しない。 ◎ All attributes in HTML documents get lowercased automatically, so the restriction on uppercase letters doesn't affect such documents.

注記: 上に挙げた 4 個の名前は,旧来の属性であり、単に~parameterを`~plugin$に送ることを超えるような副作用を伴うので,除外されている。 ◎ The four exceptions are to exclude legacy attributes that have side-effects beyond just sending parameters to the plugin.

~UAは、 `embed$e 要素の属性のうち,どの名前空間にも属さないものすべての名前と値を,利用される`~plugin$が~instance化されるときに渡すべきである。 ◎ The user agent should pass the names and values of all the attributes of the embed element that have no namespace to the plugin used, when one is instantiated.

`embed$e 要素を表現している `HTMLEmbedElement$I ~objは、要素に対し~instance化された`~plugin$に~script可能な~interfaceがあれば それを公開し~MUST。 ◎ The HTMLEmbedElement object representing the element must expose the scriptable interface of the plugin instantiated for the embed element, if any.

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

`src@mE
`type@mE
順に,(同じ名前の)[ `src$aE, `type$aE ]内容~属性を`反映-$し~MUST。 ◎ The IDL attributes src and type each must reflect the respective content attributes of the same name.

~Flashの様な,~proprietaryな~pluginを要する資源を埋込む例: ◎ Here's a way to embed a resource that requires a proprietary plugin, like Flash:

`embed-1^xCode

~pluginが備えていない利用者は、この資源を利用できないことになる(例えば,その~plugin~vendorは、利用者の~platformを~supportしていないなど)。 ◎ If the user does not have the plugin (for example if the plugin vendor doesn't support the user's platform), then the user will be unable to use the resource.

属性を指定すれば、この~pluginに~parameter[ 名前 `quality^l, 値 `high^l ]を渡せる: ◎ To pass the plugin a parameter "quality" with the value "high", an attribute can be specified:

`embed-2^xCode

これは、代わりに `object$e 要素を用いたときには,次と等価になる: ◎ This would be equivalent to the following, when using an object element instead:

`embed-3^xCode

4.8.7. `object^e 要素

`分類$
`~flow内容$ / `句内容$ / `埋込みの内容$ / `可触~内容$ /[ この要素が `usemap$a 属性を有する場合に限り,`対話的~内容$ ] / `~listされる要素$ / `提出-可能な要素$ / `~formに所有され得る要素$ ◎ Flow content. ◎ Phrasing content. ◎ Embedded content. ◎ If the element has a usemap attribute: Interactive content. ◎ Listed and submittable form-associated element. ◎ Palpable content.
`この要素を利用できる文脈$
`埋込みの内容$が期待される所。 ◎ Where embedded content is expected.
`内容~model$

次の順による並び:

  1. 0 個~以上の `param$e 要素
  2. `透過的な内容$
◎ Zero or more param elements, then, 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
`typemustmatch$aO — 資源が利用されるためには `type$aO 属性と`~Content-Type$ 値とが合致する必要があるかどうか ◎ typemustmatch — Whether the type attribute and the Content-Type value need to match for the resource to be used
`name$aO — `入子の閲覧文脈$の名前 ◎ name — Name of nested browsing context
`usemap$a — 利用する`画像~map$の名前 ◎ usemap — Name of image map to use
`form$a — この~controlの所有者にする `form$e 要素 ◎ form — Associates the control with a form element
`width$a — 横~寸法 ◎ width — Horizontal dimension
`height$a — 縦~寸法 ◎ height — Vertical dimension
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$]
interface `HTMLObjectElement@I : `HTMLElement$I {
  [`CEReactions$] attribute USVString `data$mO;
  [`CEReactions$] attribute DOMString `type$mO;
  [`CEReactions$] attribute boolean `typeMustMatch$mO;
  [`CEReactions$] attribute DOMString `name$mO;
  [`CEReactions$] attribute DOMString `useMap$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();
  void `setCustomValidity$m(DOMString %error);
};

`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 要素は、外部~資源を表現できる — それは、資源の型に依存して,[ 画像, `入子の閲覧文脈$, `~plugin$により処理される外部~資源 ]のいずれかとして扱われることになる。 ◎ The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin.

`data@aO 属性は、在するならば,資源の`~URL$を指定する。 この属性に指定する値は、`前後~空白~可の妥当かつ空でない~URL$で~MUST。 ◎ The data attribute, if present, specifies the URL of the resource. If present, the attribute must be a valid non-empty URL potentially surrounded by spaces.

作者には、信用しない他の`生成元$からの資源を参照する場合には,下に定義する `typemustmatch$aO 属性を利用することが督促される。 その属性がないと、ある種の事例において,[ 遠隔~host上の攻撃者が、~pluginの仕組みを利用して,任意の~scriptを走らす ]ことが可能になる — 作者が[ ~Flashの "allowScriptAccess" ~parameter ]に類する特色機能を利用していたとしても。 ◎ Authors who reference resources from other origins that they do not trust are urged to use the typemustmatch attribute defined below. Without that attribute, it is possible in certain cases for an attacker on the remote host to use the plugin mechanism to run arbitrary scripts, even if the author has used features such as the Flash "allowScriptAccess" parameter.

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

`object$e 要素は、 `data$aO, `type$aO 属性のうち,どちらかは有してい~MUST。 ◎ At least one of either the data attribute or the type attribute must be present.

`object$e 要素が `itemprop$a 属性を有する場合、 `data$aO 属性も有してい~MUST。 ◎ If the itemprop attribute is specified on an object element, then the data attribute must also be specified.

`typemustmatch@aO 属性は`真偽~属性$であり、在するならば,[ `data$aO 属性に指定された資源は、その`~Content-Type$が `type$aO 属性の値に合致する場合に限り利用される ]ことを指示する。 ◎ The typemustmatch attribute is a boolean attribute whose presence indicates that the resource specified by the data attribute is only to be used if the value of the type attribute and the Content-Type of the aforementioned resource match.

`typemustmatch$aO 属性は、 `data$aO, `type$aO 両~属性とも在する場合を除き,指定されては~MUST_NOT。 ◎ The typemustmatch attribute must not be specified unless both the data attribute and the type attribute are present.

`name@aO 属性に指定する値は、`妥当な閲覧文脈~名$で~MUST。 その値は、適用-可能であれば,`入子の閲覧文脈$に名前を与えるときに利用される。 ◎ The name attribute, if present, must be a valid browsing context name. The given value is used to name the nested browsing context, if applicable.

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

…~UAは、次に与える[ `object$e 要素 %O が表現するものを決定する(し直す) ]手続きを走らす`~taskを~queueし$~MUST — この`~task$が `~queueされ$ている, または 走っている間は、 %O の`~node文書$の`~load~eventを遅延-$し~MUST。 ◎ ...the user agent must queue a task to run the following steps to (re)determine what the object element represents. This task being queued or actively running must delay the load event of the element's node document.

  1. ~IF[ 利用者は、 %O の通例の挙動に代えて %O の`~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.

    注記: 利用者は、例えば %O の`~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[ 次のいずれかが満たされる ] ⇒ ~GOTO `fallback$i

    • %O の先祖には`~media要素$ がある
    • %O の先祖には[ `~fallback内容$を示していない `object$e 要素 ]がある
    • %O は`文書~内に$ない
    • %O は`文書~内に$あって,その文書が`属する閲覧文脈$ ~EQ ε
    • %O の`~node文書$は`全部的に作動中$でない
    • %O は,まだ[ `~HTML構文解析器$ / `~XML構文解析器$ ]の`~open要素~stack$内にある
    • %O は`具現化されて$いない
    • `要素は~CSPにより先天的に阻止されるべきか?$( %O ) の結果 ~EQ `阻止ed^i `CSP$r
    ◎ If the element has an ancestor media element, or has an ancestor object element that is not showing its fallback content, or if the element is not in a document that has a browsing context, or if the element's node document is not fully active, or if the element is still in the stack of open elements of an HTML parser or XML parser, or if the element is not being rendered, or if the Should element be blocked a priori by Content Security Policy? algorithm returns "Blocked" when executed on the element, then jump to the step below labeled fallback. [CSP]
  3. %classid ~LET [ %O は `classid$a 属性を有するならば その値 / ~ELSE_ ε ] ◎ ↓
  4. ~IF[ %classid ~NIN { ε, 空~文字列 } ]: ◎ If the classid attribute is present, and has a value that isn't the empty string, then:\

    1. ~IF[ ~UAは %classid に則って相応しい`~plugin$を見出せる ]: ◎ if the user agent can find a plugin suitable according to the value of the classid attribute, and\

      1. ~IF[ その~pluginは`~sandbox化されて$いる ]~AND[ その~pluginは`保安化-$できない ] ⇒ ~GOTO `fallback$i ◎ either plugins aren't being sandboxed or that plugin can be secured, then\
      2. ~UAは、その`~pluginを利用するべき$である — %O が `data$aO 属性を有するならば それも`~plugin$に渡されるべきである ◎ that plugin should be used, and the value of the data attribute, if any, should be passed to the plugin.\
      3. ~IF[ `~plugin$から~errorが報告された ] ⇒ ~GOTO `fallback$i ◎ If no suitable plugin can be found, or if the plugin reports an error, jump to the step below labeled fallback.
      4. ~RET 【この段は、この訳による補完】
    2. ~ELSE ⇒ ~GOTO `fallback$i ◎ ↑
  5. %data ~LET [ %O は `data$aO 属性を有するならば その値 / ~ELSE_ ε ] ◎ ↓
  6. %type ~LET [ %O は `type$aO 属性を有するならば その値 / ~ELSE_ ε ] ◎ ↓
  7. ~IF[ %data ~IN { ε, 空~文字列 } ] ⇒ ~GOTO `~dataなし$i ◎ If the data attribute is present and its value is not the empty string, then:
  8. ~IF[ %type ~NEQ ε ]~AND[ %type は~UA~supportする型でない ]~AND[ %type は~UAが`~plugin$を見出せる型でない ] ⇒ ~UAの任意選択で ⇒ ~GOTO `fallback$i (その実の型を精査するために内容を~fetchすることなく。) ◎ If the type attribute is present and its value is not a type that the user agent supports, and is not a type that the user agent can find a plugin for, then the user agent may jump to the step below labeled fallback without fetching the content to examine its real type.
  9. %~url ~LET %data を %O の`~node文書$に`相対的に構文解析-$した`結果の~URL~record$ ◎ Parse the URL specified by the data attribute, relative to the element's node document.
  10. ~IF[ %~url ~EQ ~error ]:

    1. %O に向けて,名前 `error$et の`~eventを発火する$
    2. ~GOTO `fallback$i
    ◎ If that failed, fire an event named error at the element, then jump to the step below labeled fallback.
  11. %要請 ~LET 次のようにされた新たな`要請$ ⇒# `~url$rq ~SET %~url, `~client$rq ~SET %O の`~node文書$の `Window$I ~objの`環境~設定群~obj$, `行先$rq ~SET `object^l, `資格証~mode$rq ~SET `include^l, `~URL資格証~利用~flag$rq ~SET ~ON ◎ Let request be a new request whose url is the resulting URL record, client is the element's node document's Window object's environment settings object, destination is "object", credentials mode is "include", and whose use-URL-credentials flag is set.
  12. %要請 を`~fetch$する: ◎ Fetch request.

    • 資源の~fetchingは、[ 資源が~fetchされ,`~network用~task源$から`~queueされ$る`~task$(次の段を見よ)が走る ]まで, %O の`~node文書$を`~load~eventを遅延-$し~MUST。 ◎ 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.
    • ~app~cache関連の記述】 ◎ For the purposes of the application cache networking model, this fetch operation is not for a child browsing context (though it might end up being used for one after all, as defined below).
    【以下に現れる “資源” は、~fetchingにより得られた資源を指す。】
  13. ~IF[ 資源は まだ可用でない(例:資源は~cache内に可用でなかったので、資源を読込むためには~network越しに要請を発行することが要求される) ] ⇒ ~GOTO `fallback$i — ただし ⇒ `~network用~task源$から`~queueされ$た`~task$は、資源が可用になり次第,この~algoをこの段から再開し~MUST。 資源は増分的に読込める — ~UAは資源の処理を始めるに十分な~dataが得られ次第、資源を “可用” と見なしてよい。 ◎ 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.
  14. ~IF[ 資源を読込むのに失敗した(例: ~HTTP 404 ~error / ~DNS~errorが生じた) ]:

    1. %O に向けて,名前 `error$et の`~eventを発火する$
    2. ~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.
  15. %資源~型 ~LET 次の下位手続きを走らせた結果: ◎ Determine the resource type, as follows:

    1. %Content-Type ~LET [ 資源には `~Content-Type~metadata$が結付けられているならば それが指定する型 / ~ELSE_ ε ] ◎ ↓
    2. ~IF[ %O は `typemustmatch$aO 属性を有する ]:

      1. ~IF[ %type ~NEQ ε ]~AND[ %Content-Type ~NEQ ε ]~AND[ %Content-Type は`~ASCII大小無視$で %type に合致する ] ⇒ ~RET %type
      2. ~RET `未知^i
      ◎ Let the resource type be unknown. ◎ If the object element has a type attribute and a typemustmatch attribute, and the resource has associated Content-Type metadata, and the type specified in the resource's Content-Type metadata is an ASCII case-insensitive match for the value of the element's type attribute, then let resource type be that type and jump to the step below labeled handler. ◎ If the object element has a typemustmatch attribute, jump to the step below labeled handler.
    3. ~IF[ ~UAは この資源に対しては、 `Content-Type^h ~headerに厳格に順守するよう環境設定されている ]~AND[ %Content-Type ~NEQ ε ] ⇒ ~RET %Content-Type ◎ 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の~pluginが利用される 【ものと期待して,頁に】 資源を埋込もうとしたが、遠隔~siteはそれを上書きして,代わりに[ 保安~上の特徴が異なる,別の~plugin ]を誘発させるような 【Content-Type~headerを伴わせて】 資源を~UAに~~供給したときに。 ◎ This can introduce a vulnerability, wherein a site is trying to embed a resource that uses a particular plugin, but the remote site overrides that and instead furnishes the user agent with a resource that triggers a different plugin with different security characteristics.

    4. ~IF[ %type ~NEQ ε ]~AND[ %type は~UAが~supportする型でない ]~AND[ %type は ある`~plugin$が~supportする型である ] ⇒ ~RET %type ◎ If there is a type attribute present on the object element, and that attribute's value is not a type that the user agent supports, but it is a type that a plugin supports, then let the resource type be the type specified in that type attribute, and jump to the step below labeled handler.
    5. ~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[ 次のいずれかが満たされるならば ~T / ~ELSE_ ~F ]:

        • [ %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 は`~plugin$が~supportする型である ] ⇒ ~RET %type ◎ ↓
        2. ~IF[ %type は `image/^l から開始している ]~AND[ %type は`~XML~MIME型$ではない ] ⇒ ~RET %type ◎ If the attribute's value is a type that a plugin supports, or 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.
        3. ~RET `未知^i ◎ Jump to the step below labeled handler.
    6. ~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.
    7. %~URL ~LET `~URL構文解析する$( 資源の(~redirect後の)~URL ) ◎ If applying the URL parser algorithm to the URL of the specified resource (after any redirects)\
    8. ~IF[ %~URL ~NEQ `失敗^i ]~AND[ %~URL の`~path$urlは ある`~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".

    9. ~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.
  16. %B ~LET %O が`入子にしている閲覧文脈$ ◎ ↓
  17. ~IF[ %資源~型 ~EQ `未知^i ] ⇒ ~GOTO `fallback$i ◎ ↑↓
  18. 次のうち, %資源~型 が最初に満たす条件に応じて、対応する段に従って資源の内容を取扱う: ◎ Handler: Handle the content as given by the first of the following cases that matches:

    [ %資源~型 は ~UAが~supportする型でない ]~AND[ %資源~型 は ある`~plugin$が~supportする型である ]: ◎ If the resource type is not a type that the user agent supports, but it is a type that a plugin supports
    1. ~IF[ %B ~NEQ ~NULL ]:

      1. `閲覧文脈を破棄する$( %B )
      2. %O が`入子にしている閲覧文脈$ ~SET ~NULL
      ◎ If the object element's nested browsing context is non-null, then it must be discarded and then set to null.
    2. ~IF[ その~pluginは`~sandbox化されて$いる ]~AND[ その~pluginは`保安化-$できない ] ⇒ ~GOTO `fallback$i ◎ If plugins are being sandboxed and the plugin that supports resource type cannot be secured, jump to the step below labeled fallback.
    3. ~UAは その`~pluginを利用するべき$である — その`~plugin$には資源の内容も渡すべきである ◎ ↓
    4. ~IF[ `~plugin$から~errorが報告された ] ⇒ ~GOTO `fallback$i ◎ Otherwise, the user agent should use the plugin that supports resource type and pass the content of the resource to that plugin. If the plugin reports an error, then jump to the step below labeled fallback.
    %資源~型 は`~XML~MIME型$である: ◎ ↓
    %資源~型 は `image/^l から開始していない: ◎ If the resource type is an XML MIME type, or if the resource type does not start with "image/"
    1. ~IF[ %B ~EQ ~NULL ]:

      1. %B ~SET `新たな閲覧文脈を作成する$()
      2. %O が`入子にしている閲覧文脈$ ~SET %B
      ◎ If the object element's nested browsing context is null, set the element's nested browsing context to a newly-created browsing context. ◎ The object element must be associated with a newly created nested browsing context, if it does not already have one.
    2. ~IF[ 所与の資源の`~URL$は `about_blank$sc でない ] ⇒ 次を与える下で, %B をその資源へ`~navigate$する ⇒# `置換~可能化~flag$ ~SET ~ON, `~source閲覧文脈$ ~SET %O の`~node文書$が`属する閲覧文脈$

      ( %O の `data$aO 属性は、 %B が更に他の所在に~navigateされても更新されない。)

      ◎ If the URL of the given resource is not about:blank, the element's nested browsing context must then be navigated to that resource, with replacement enabled, and with the object element's node document's browsing context as the source browsing context. (The data attribute of the object element doesn't get updated if the browsing context gets further navigated to other locations.)
    3. ~ELSE ⇒ 次を走らす`~taskを~queueする$ ⇒ %O に向けて名前 `load$et の`~eventを発火する$

      注記: `load$et ~eventは、 `about_blank$sc 文書に向けては発火されない。

      ◎ If the URL of the given resource is about:blank, then, instead, the user agent must queue a task to fire an event named load at the object element. No load event is fired at the about:blank document itself.
    4. この時点で、 %O は`入子の閲覧文脈$を`表現-$する ◎ The object element represents the nested browsing context.
    5. %B の`閲覧文脈~名$ ~SET %O が `name$aO 属性を[ 有するならば その値 / 有さないならば 空~文字列 ] ◎ If the name attribute is present, the object element's nested browsing context's browsing context name must be set to the value of this attribute; otherwise, the browsing context name must be set to the empty string.

    注記: 【~app~cache関連の記述】 ◎ In certain situations, e.g., if the resource was fetched from an application cache but it is an HTML file with a manifest attribute that points to a different application cache manifest, the navigation of the browsing context will be restarted so as to load the resource afresh from the network or a different application cache. Even if the resource is then found to have a different type, it is still used as part of a nested browsing context: only the navigate algorithm is restarted, not this object algorithm.

    ( %資源~型 は `image/^l から開始していて,) 画像の~supportは不能化されていない: ◎ If the resource type starts with "image/", and support for images has not been disabled
    1. ~IF[ %B ~NEQ ~NULL ]:

      1. `閲覧文脈を破棄する$( %B )
      2. %O が`入子にしている閲覧文脈$ ~SET ~NULL
      ◎ If the object element's nested browsing context is non-null, then it must be discarded and then set to null.
    2. `画像の~sniffing$規則を適用して,画像の型を決定する ◎ Apply the image sniffing rules to determine the type of the image.
    3. この時点で、 %O は指定された画像を`表現-$する ◎ 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.
    【† 具現化できなくても,画像を表現すると見なされる? 】
    その他: ◎ Otherwise
    ~GOTO `fallback$i ( %資源~型 は~supportされていない。) ◎ 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.
  19. 資源が完全に読込まれた時点で,次を走らす`~taskを~queueする$ようにしておく ⇒ %O に向けて名前 `load$et の`~eventを発火する$ ◎ ↓
  20. ~RET — この時点で, %O の内容は %O が表現するものの一部を成さないとされる ◎ The element's contents are not part of what the object element represents. ◎ Return. Once the resource is completely loaded, queue a task to fire an event named load at the element.
  21. `~dataなし@i:

    1. ~IF[ %data ~EQ 空~文字列 ]~OR[ %type ~EQ ε ] ⇒ ~GOTO `fallback$i
    2. ~IF[ ~UAは %type に則って相応しい`~plugin$を見出せる ]:

      1. ~IF[ その~pluginは`~sandbox化されて$いる ]~AND[ その~pluginは`保安化-$できない ] ⇒ ~GOTO `fallback$i
      2. ~UAは、その`~pluginを利用するべき$である
      3. ~IF[ その`~plugin$から~errorが報告された ] ⇒ ~GOTO `fallback$i
      4. その~pluginが完全に読込まれた時点で,次を走らす`~taskを~queueする$ようにしておく ⇒ %O に向けて,名前 `load$et の`~eventを発火する$
      5. ~RET
    ◎ If the data attribute is absent but the type attribute is present, and the user agent can find a plugin suitable according to the value of the type attribute, and either plugins aren't being sandboxed or the plugin can be secured, then that plugin should be used. If these conditions cannot be met, or if the plugin reports an error, jump to the step below labeled fallback. Otherwise return; once the plugin is completely loaded, queue a task to fire an event named load at the element.
  22. `fallback@i: この時点で、 %O は[ %O の子のうち, `param$e 要素~以外のもの ]を`表現-$する — それらが %O の`~fallback内容$になる ◎ Fallback: The object element represents the element's children, ignoring any leading param element children. This is the element's fallback content.\

    1. ~IF[ %O が~instance化した`~plugin$はある ] ⇒ その~pluginを未読込みにする ◎ If the element has an instantiated plugin, then unload it.\
    2. ~IF[ %B ~NEQ ~NULL ]:

      1. `閲覧文脈を破棄する$( %B )
      2. %O が`入子にしている閲覧文脈$ ~SET ~NULL
      ◎ If the element's nested browsing context is non-null, then it must be discarded and then set to null.

~UAは,上の~algoにて `object$e 要素 %O に対し ある`~plugin$を~instance化して利用するときは: ◎ When the algorithm above instantiates a plugin,\

~pluginは、 `object$e 要素の目的においては,[ `閲覧文脈~sandbox化( ~plugin )~flag$ ~IN 要素の`~node文書$の`作動中の~sandbox法~flag集合$ ]ならば `~sandbox化されて@ いるものと見なされる。 ◎ Plugins are considered sandboxed for the purpose of an object element if the sandboxed plugins browsing context flag is set on the object element's node document's active sandboxing flag set.

`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 要素が`入子にしている閲覧文脈$ %B (~NEQ ~NULL )にて`作動中の文書$ %文書 に対し,次のいずれかが満たされている間は、要素は %文書 の`~load~eventを遅延-$し~MUST:

  • %文書 の`読込後~taskは準備済み$でない
  • %文書 の`~load~eventを遅延-$している何かがある
  • %B は`~load~event遅延-中~mode$下にある
◎ When an object element's nested browsing context is non-null: if the object element's nested browsing context's active document is not ready for post-load tasks, and when anything is delaying the load event of the object element's browsing context's active document, and when the object element's browsing context is in the delaying load events mode, the object must delay the load event of its document.

この節に言及された`~task$の`~task源$は、`~DOM操作~task源$とする。 ◎ The task source for the tasks mentioned in this section is the DOM manipulation task source.

`object$e 要素が画像を表現している場合、 `usemap$a 属性を用いて`画像~map$を結付けるよう指示できる。 この属性は、画像を表現していない `object$e 要素に対しては,無視され~MUST。 ◎ The usemap attribute, if present while the object element represents an image, can indicate that the object has an associated image map. The attribute must be ignored if the object element doesn't represent an image.

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

拘束~検証 ⇒ `object$e 要素は、常に`拘束~検証の対象外$とする。 ◎ Constraint validation: object elements are always barred from constraint validation.

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

`data@mO
`type@mO
`name@mO
`typeMustMatch@mO
`useMap@mO
順に,(小文字~化した名前の)[ `data$aO, `type$aO, `name$aO, `typemustmatch$aO, `usemap$a ]内容~属性を`反映-$し~MUST。 ◎ The IDL attributes data, type and name each must reflect the respective content attributes of the same name.\ The typeMustMatch IDL attribute must reflect the typemustmatch content attribute.\ The useMap IDL attribute must reflect the usemap content attribute.
`contentDocument@mO
取得子は、此れの`内容~文書$を返さ~MUST。 ◎ The contentDocument IDL attribute, on getting, must return the object element's content document.
`contentWindow@mO
取得子は、此れが`入子にしている閲覧文脈$ %B に応じて,[ 非 ~NULL ならば %B の `WindowProxy$I ~obj / ~ELSE_ ~NULL ]を返さ~MUST。 ◎ The contentWindow IDL attribute must return the WindowProxy object of the object element's nested browsing context, if its nested browsing context is non-null; otherwise, it must return null.

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

`object-2^xCode

次の例に ~pluginを~HTML内で利用する方法を示す(この事例では、動画~fileを示す~Flash~plugin)。 ~Flashは可能化されていないが `video$e は~supportする~UA利用者~向けには、~fallbackとして,動画を示す `video$e 要素を供している。 最後に,~Flashも `video$e 能力も備えない~browser利用者~向けには、動画への~linkを供している。 ◎ The following example shows how a plugin can be used in HTML (in this case the Flash plugin, to show a video file). Fallback is provided for users who do not have Flash enabled, in this case using the video element to show the video for those using user agents that support video, and finally providing a link to the video for those who have neither Flash nor a video-capable browser.

`object-3^xCode

4.8.8. `param^e 要素

`分類$
なし。 ◎ None.
`この要素を利用できる文脈$
`object$e 要素の子として — ただし,同胞のどの`~flow内容$よりも前。 ◎ As a child of an object element, before any flow content.
`内容~model$
`なし$。 ◎ Nothing.
`text/html における~tag省略$
`終了tag$はない。 ◎ No end tag.
`内容~属性$
`大域~属性$ ◎ Global attributes
`name$aP — ~parameterの名前 ◎ name — Name of parameter
`value$aP — ~parameterの値 ◎ value — Value of parameter
`~DOM~interface$
[Exposed=Window,
 `HTMLConstructor$]
interface `HTMLParamElement@I : `HTMLElement$I {
  [`CEReactions$] attribute DOMString `name$mP;
  [`CEReactions$] attribute DOMString `value$mP;
};

`param$e 要素は、 `object$e 要素により呼出される~plugin用の~parameterを定義する — それは、自身のみでは何も`表現-$しない。 ◎ The param element defines parameters for plugins invoked by object elements. It does not represent anything on its own.

`param$e 要素の `name@aP, `value@aP 属性は: ◎ ↓

`param$e 要素が[ ~instance化された`~plugin$を`表現-$する `object$e 要素の子である ]~AND[ ~UAは、`~plugin$を更新する能を備える~API特色機能を利用して,`~plugin$と通信している ]下で,要素が定義する`~parameter$の[ 名前または値 ]が変化したときは、~UAは 更新する能を適切に行使して,`~plugin$に変化を通知し~MUST。 ◎ If either the name or value of a parameter defined by a param element that is the child of an object element that represents an instantiated plugin changes, and if that plugin is communicating with the user agent using an API that features the ability to update the plugin when the name or value of a parameter so changes, then the user agent must appropriately exercise that ability to notify the plugin of the change.

`name@mP
`value@mP
順に,(同じ名前の)[ `name$aP, `value$aP ]内容~属性を`反映-$し~MUST。 ◎ The IDL attributes name and value must both reflect the respective content attributes of the same name.

`param$e 要素を用いて、~parameterを~plugin(この事例では、 O3D ~plugin)に渡す例: ◎ The following example shows how the param element can be used to pass a parameter to a plugin, in this case the O3D plugin.

`param-1^xCode

4.8.9. 〜 4.8.15.

これらの節の和訳は 別ページ(画像~関連)別ページ(~media要素) にて。

4.8.16. ~MathML

~MathML `math$e 要素は、この仕様における内容~modelの目的においては,[ `埋込みの内容$ / `句内容$ / `~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内容$で~MUST。 ◎ 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名前空間$に属する要素のうち,`句内容$を包含して~MAY。 ◎ 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を包装しているように装う ]ことにより,取扱わ~MUST。 (しかしながら、そのような~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 要素に置換されていた ]かのように動作し~MUST。 ◎ 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.

[ 作者が,~XML形による~MathMLのみを受容する~MathML~toolを利用できるようにする ]ため、対話的~HTML~UAには,[ ~MathML素片を,~XML名前空間整形式の~XML素片として~exportする仕方 ]を供することが奨励される。 ◎ To enable authors to use MathML tools that only accept MathML in its XML form, interactive HTML user agents are encouraged to provide a way to export any MathML fragment as an XML namespace-well-formed XML fragment.

~MathML要素の意味論は、~MathML仕様, および他の`適用-可能な仕様$にて定義される。 `MATHML$r ◎ The semantics of MathML elements are defined by the MathML specification 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.17. ~SVG

~SVG `svg$e 要素は、この仕様における内容~modelの目的においては,[ `埋込みの内容$ / `句内容$ / `~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.

[ 作者が,~XML形による~SVGのみを受容する~SVG~toolを利用できるようにする ]ため、対話的~HTML~UAには,[ ~SVG素片を,~XML名前空間整形式の~XML素片として~exportする仕方 ]を供することが奨励される。 ◎ To enable authors to use SVG tools that only accept SVG in its XML form, interactive HTML user agents are encouraged to provide a way to export any SVG fragment as an XML namespace-well-formed XML fragment.

~SVG `foreignObject$e 要素が包含する,`~HTML名前空間$に属する要素は、`~flow内容$で~MUST。 ◎ When the SVG foreignObject element contains elements from the HTML namespace, such elements must all be flow content.

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

~SVG要素の意味論は、~SVG仕様と他の`適用-可能な仕様$にて定義される。 `SVG$r ◎ The semantics of SVG elements are defined by the SVG specification 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 images.
`getSVGDocument()@m

被呼出時には、次を走らせ~MUST: ◎ The getSVGDocument() method must run the following steps:

  1. %B ~LET 此れが`入子にしている閲覧文脈$ ◎ ↓
  2. ~IF[ %B ~EQ ~NULL ] ⇒ ~RET ~NULL ◎ If the element's nested browsing context is null, then return null.
  3. %文書 ~LET %B にて`作動中の文書$ ◎ ↓
  4. ~IF[ ( %文書 の`生成元$, 此れの`~node文書$の`生成元$ ) は `同じ生成元~domain$でない ] ⇒ ~RET ~NULL ◎ If the origin of the active document of the nested browsing context is not same origin-domain with the element's node document's origin, then return null.
  5. ~IF[ %文書 は、[ `~navigate$~algoにおいて`資源に算出される~MIME型$は `image/svg+xml$mt であった ]ため, ~XML~fileに対する頁~読込み処理~model 節により作成されたものである ] ⇒ ~RET %文書 ◎ If the nested browsing context's active document 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 that Document object.
  6. ~RET ~NULL ◎ Otherwise, return null.

4.8.18. 寸法~属性

作者~要件: [ `img$e / `iframe$e / `embed$e / `object$e / `video$e / [ `type$a 属性が `Image$st 状態にある `input$e ]]要素~上には、要素の視覚的~内容の寸法を`~CSS~pixel$単位で与える[ `width@a, `height@a ]属性が指定されてよい(順に,出力~mediaの名目上の方向に相対的な[ 横幅, 縦幅 ]を与える)。 これらの属性に指定する値は、`妥当な非負~整数$で~MUST。 ◎ Author requirements: The width and height attributes on img, iframe, embed, object, video, and, when their type attribute is in the Image Button state, input elements may be specified 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 になるが,一般には 読み取り距離に依存する。) 両~属性とも指定された場合、次のいずれかが満たされ~MUST: ◎ 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, %H は,順に `width$a, `height$a 属性の値とする。 %iW, %iH は,順に資源の[ `内在的~横幅$, `内在的~縦幅$ ]とする。 ◎ The target ratio is the ratio of the intrinsic width to the intrinsic height in the resource. The specified width and specified height are the values of the width and height attributes respectively.

当の資源が`内在的~横幅$も`内在的~縦幅$も持たない場合、両~属性とも省略され~MUST。 ◎ The two attributes must be omitted if the resource in question does not have both an intrinsic width and an intrinsic height.

両~属性とも値が 0 の場合、要素は 利用者~向けに意図されていないことを指示する(例:頁が見られた回数を数える~service用途など)。 ◎ If the two attributes are both zero, 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要件: ~UAには、これらの属性を`具現化~用~hint$に利用することが期待される。 ◎ User agent requirements: User agents are expected to use these attributes as hints for the rendering.

[ `iframe$e / `embed$e / `object$e / `video$e ]要素~上の `width@m, `height@m ~IDL属性は、順に,(同じ名前の)[ `width$a, `height$a ]内容~属性を`反映-$し~MUST。 ◎ The width and height IDL attributes on the iframe, embed, object, and video elements must reflect the respective content attributes of the same name.

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