【この訳に固有の表記規約】
この訳の,~algoや定義の記述に利用されている各種記号( ~LET, ~IF, ε, 此れ, ~THROW 等々)の意味や定義の詳細は,~SYMBOL_DEF_REFを~~参照されたし。
7.3. `Window^I ~obj
【 以下,この訳では、 `Window$I ~interfaceを実装する~objを単に ~window とも略記する。 この略記は、この頁に限らず,この仕様の他の頁の和訳でも利用される — この節を指す~linkが付与された “`~window$” は、 `Window$I ~objを表すとする。 】
[Global=Window, Exposed=Window, LegacyUnenumerableNamedProperties] interface `Window@I : `EventTarget$I { /* 現在の閲覧文脈 ◎ the current browsing context */ [Unforgeable] readonly attribute `WindowProxy$I `window$m; [Replaceable] readonly attribute `WindowProxy$I `self$m; [Unforgeable] readonly attribute `Document$I `document$m; attribute DOMString `name$m; [PutForwards=`href$m, Unforgeable] readonly attribute `Location$I `location$m; readonly attribute `History$I `history$m; readonly attribute `CustomElementRegistry$I `customElements$m; [Replaceable] readonly attribute `BarProp$I `locationbar$m; [Replaceable] readonly attribute `BarProp$I `menubar$m; [Replaceable] readonly attribute `BarProp$I `personalbar$m; [Replaceable] readonly attribute `BarProp$I `scrollbars$m; [Replaceable] readonly attribute `BarProp$I `statusbar$m; [Replaceable] readonly attribute `BarProp$I `toolbar$m; attribute DOMString `status$m; void `close$m(); readonly attribute boolean `closed$m; void `stop$m(); void `focus$m(); void `blur$m(); /* 他の閲覧文脈 ◎ other browsing contexts */ [Replaceable] readonly attribute `WindowProxy$I `frames$m; [Replaceable] readonly attribute unsigned long `length$m; [Unforgeable] readonly attribute `WindowProxy$I? `top$m; attribute any `opener$m; [Replaceable] readonly attribute `WindowProxy$I? `parent$m; readonly attribute `Element$I? `frameElement$m; `WindowProxy$I? `open$m( optional USVString %url = "about:blank", optional DOMString %target = "_blank", optional [TreatNullAs=EmptyString] DOMString %features = "" ); `getter$m `object$ (DOMString %name); /* これは大域~objなので、 IDL 有名~prop取得子は,~prototype-chain上に `NamedPropertiesObject^I ~exotic~objを追加する。 ~~実際、これが大域~objを~exotic~objにすることはない。 ~indexによる~accessは `WindowProxy$I ~exotic~objが引き受ける。 ◎ Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic object on the prototype chain. Indeed, this does not make the global object an exotic object. Indexed access is taken care of by the WindowProxy exotic object. */ /* ~UA ◎ the user agent */ readonly attribute `Navigator$I `navigator$m; readonly attribute `ApplicationCache$I `applicationCache$m; /* 利用者~向けの~prompt ◎ user prompts */ void `alert$m(); void `alert$m(DOMString %message); boolean `confirm$m(optional DOMString %message = ""); DOMString? `prompt$m( optional DOMString %message = "", optional DOMString %default = "" ); void `print$m(); unsigned long `requestAnimationFrame$m(`FrameRequestCallback$I %callback); void `cancelAnimationFrame$m(unsigned long %handle); void `postMessage$m( any %message, USVString %targetOrigin, optional sequence<`object$> %transfer =[] ); }; `Window$I includes `GlobalEventHandlers$I; `Window$I includes `WindowEventHandlers$I; callback `FrameRequestCallback@I = void (`DOMHighResTimeStamp$I %time);
- %window . `window$m
- %window . `frames$m
- %window . `self$m
- これらの属性はいずれも %window を返す。 ◎ These attributes all return window.
- %window . `document$m
- %window に`結付けられている文書$を返す。 ◎ Returns the Document associated with window.
- %document . `defaultView$m
- `作動中の文書$を`結付けている~window$を返す。 ◎ Returns the Window object of the active document.
各`~window$には、`文書$が `結付けられる@doc 。 それは、`~window$の作成-時に初期 `about_blank$sc `文書$に設定され、`~navi$の間に限り,そこから変化する。 ◎ The Window has an associated Document, which is a Document object. It is set when the Window object is created, and only ever changed during navigation from the initial about:blank Document.
`~window$ %W に`結付けられている文書$が`属する閲覧文脈$を指して、単に, %W に `対応する閲覧文脈@ という — それは、 %W を包装している `WindowProxy$I ~objを結付けている`閲覧文脈$と言っても同じである(無ければ ε になる)。
【 この用語は、簡便に記すため,この訳にて導入したもの。 ~APIの記述にて、単に “the 閲覧文脈” としか記されていない箇所も,この用語に置換している。 】
- `window@m
- `frames@m
- `self@m
- これらの属性の取得子は、此れに`対応する閲覧文脈$の `WindowProxy$I ~objを返さ~MUST。 ◎ The window, frames, and self IDL attributes, on getting, must all return this Window object's browsing context's WindowProxy object.
- `document@m
- 取得子は、此れに`結付けられている文書$を返さ~MUST。 ◎ The document IDL attribute, on getting, must return this Window object's associated Document.
- 注記: `~window$に`結付けられている文書$が変化し得る事例は、唯一,[ `~navigate$ ~algoが,`閲覧文脈$内に最初の頁を読込むために`新たな文書を初期化する$ ]ときに限られる。 その事例では、元の `about_blank$sc 頁の `~window$が再利用され,新たな`文書$を取得する。 ◎ The Document object associated with a Window object can change in exactly one case: when the navigate algorithm initializes a new Document object for the first page loaded in a browsing context. In that specific case, the Window object of the original about:blank page is reused and gets a new Document object.
`Document$I 上の `defaultView@m 取得子は、[ 此れが`属する閲覧文脈$ ~NEQ ε ならば その `WindowProxy$I ~obj / ~ELSE_ ~NULL ]を返さ~MUST。 ◎ The defaultView IDL attribute of the Document interface, on getting, must return this Document's browsing context's WindowProxy object, if this Document has an associated browsing context, or null otherwise.
歴史的~事由から、各`~window$は、次の特徴を備える~propを持た~MUST:
- writable, configurable, 非 enumerable
- 名前: `HTMLDocument@l
- 値: `Document$I interface object
7.3.2. 他の閲覧文脈への~access法
- %window . `length$m
- `文書~木に属する子~閲覧文脈$の個数を返す。 ◎ Returns the number of document-tree child browsing contexts.
- %window[%index]
- `文書~木に属する子~閲覧文脈$のうち, %index で指示されるものを返す。 ◎ Returns the indicated document-tree child browsing context.
- `length@m
- 取得子は、此れに`結付けられている文書$が`属する閲覧文脈$の`文書~木に属する子~閲覧文脈$たちの個数を返さ~MUST ◎ The number of document-tree child browsing contexts of a Window object W is the number of document-tree child browsing contexts of W's associated Document's browsing context. ◎ The length IDL attribute's getter must return the number of document-tree child browsing contexts of this Window object.
注記: ~indexによる`文書~木に属する子~閲覧文脈$への~accessは、 `WindowProxy$I ~objの `GetOwnProperty$sl 内部~methodを通して定義される。 ◎ Indexed access to document-tree child browsing contexts is defined through the [[GetOwnProperty]] internal method of the WindowProxy object.
7.3.3. `Window^I ~objに対する名前による~access
- %window[%name]
- 指示された要素(たち)の~collectionを返す。 ◎ Returns the indicated element or collection of elements.
- 一般に、これに依拠すると,~codeは壊れやすくなる。 例えば、~Web~platformに新たな特色機能が追加されるに伴い,どの ID がこの~APIに対応付けられるかは時を経るに伴い変わり得るので。 代わりに, `document.getElementById()^m / `document.querySelector()^m を利用すること。 ◎ As a general rule, relying on this will lead to brittle code. Which IDs end up mapping to this API can vary over time, as new features are added to the Web platform, for example. Instead of this, use document.getElementById() or document.querySelector().
`~window$ %W の `文書~木に属する子~閲覧文脈~名~prop集合@ は、次の手続きの結果で与えられる: ◎ The document-tree child browsing context name property set of a Window object window is the return value of running these steps:
- %名前~list ~LET 空~list ◎ ↓
- %文書 ~LET %W に`対応する閲覧文脈$にて`作動中の文書$ ◎ Let activeDocument be window's browsing context's active document.
- %子~閲覧文脈~list ~LET %文書 が`属する閲覧文脈$の`文書~木に属する子~閲覧文脈$たちからなる~list ◎ Let childBrowsingContexts be all document-tree child browsing contexts of activeDocument's browsing context whose\
-
%子~閲覧文脈~list 内の ~EACH( %B ) に対し:
- %名前 ~LET %B の`閲覧文脈~名$
- ~IF[ %名前 ~EQ 空~文字列 ]~OR[ %名前 ~IN %名前~list ] ⇒ ~CONTINUE
- ~IF[ %名前 ~NEQ %B の`閲覧文脈~容器$の `name^a 内容~属性~値 ]~AND[ ( %B にて`作動中の文書$の`生成元$, %文書 の`生成元$ ) は`同一生成元$でない ] ⇒ ~CONTINUE
- %名前~list に %名前 を付加する
- ~RET %名前~list ◎ Return the browsing context names of childBrowsingContexts, in the same order.
例えば次の頁が `https://example.org/^c にて~hostされていて, `https://elsewhere.example/^c の `iframe^e の `name$m が `spices^l に設定されたとするとき、すべてが読込まれた後に `window.spices^c を評価した結果は undefined になる: ◎ This means that in the following example, hosted on https://example.org/, assuming https://elsewhere.example/ sets window.name to "spices", evaluating window.spices after everything has loaded will yield undefined:
<iframe src=https://elsewhere.example.com/></iframe> <iframe name=spices></iframe>
各`~window$は、`有名~propを~supportする$。 所与の任意の時点における`~window$ %W が`~supportする~prop名$は、次のものからなる: ◎ The Window object supports named properties. The supported property names of a Window object window at any moment consist of the following, in tree order according to the element that contributed them, ignoring later duplicates:
- %W の`文書~木に属する子~閲覧文脈~名~prop集合$ ◎ window's document-tree child browsing context name property set;
-
[ %W に`対応する閲覧文脈$にて`作動中の文書$ ]内にある`有名~要素$の`要素~名$ — `要素~名$が同じものが複数あるときは、`木~順序$で最初のもの以外は無視する。
所与の`文書$ %文書 内の `有名~要素@, およびその `要素~名@ は、次で与えられる:
- %文書 を`根$とする`文書~木~内$にある[ `embed$e, `form$e, `frameset$e, `img$e, `object$e ]要素のうち,[ `name^a 内容~属性を有していて,その値 ~NEQ 空~文字列 ]なるもの — その属性~値が`要素~名$を与える
- %文書 を`根$とする`文書~木~内$にある`~HTML要素$のうち,[ `id$a 内容~属性を有していて,その値 ~NEQ 空~文字列 ]なるもの — その属性~値が`要素~名$を与える
【 `有名~要素$, `要素~名$は、記述を論理的に集約するためにこの訳に導入した用語であり,この節でしか利用されない。 】
◎ the value of the name content attribute for all embed, form, frameset, img, and object elements that have a non-empty name content attribute and are in a document tree with window's browsing context's active document as their root; and ◎ the value of the id content attribute for all HTML elements that have a non-empty id content attribute and are in a document tree with window's browsing context's active document as their root.
`~window$ %W において,所与の %名前 に対し`有名~propの値を決定する$ときは、次の手続きの結果を返さ~MUST: ◎ To determine the value of a named property name in a Window, the user agent must return the value obtained using the following steps:
- ~Assert: %名前 は %W が`~supportする~prop名$である 【この段は、この訳による補完。】
-
%~obj~list ~LET %W に`対応する閲覧文脈$にて`作動中の文書$内の[ 名前 %名前 の`有名~obj$ ]からなる~list ◎ Let objects be the list of named objects with the name name.
注記: 定義により、 %~obj~list は空でない。 ◎ There will be at least one such object, by definition.
- ~IF[ %~obj~list 内に`入子の閲覧文脈$はある ] ⇒ ~RET[ それらのうち,`閲覧文脈~容器$の`木~順序$で最初のもの ]の `WindowProxy$I ~obj ◎ If objects contains a nested browsing context, then return the WindowProxy object of the nested browsing context corresponding to the first browsing context container in tree order whose nested browsing context is in objects.
- ~IF[ %~obj~list 内の要素~数 ~EQ 1 ] ⇒ ~RET その要素 ◎ Otherwise, if objects has only one element, return that element.
- ~RET 次のようにされた `HTMLCollection$I ⇒# 根: `Document$I ~node, ~filter: 名前 %名前 の`有名~obj$のみに合致する(定義により,これらはすべて要素になる) ◎ Otherwise return an HTMLCollection rooted at the Document node, whose filter matches only named objects with the name name. (By definition, these will all be elements.)
この節の目的における,`文書$ %文書 内の[ 名前 %名前 の `有名~obj@ ]は、次に挙げるものからなる: ◎ Named objects with the name name, for the purposes of the above algorithm, consist of the following:
- %文書 が`属する閲覧文脈$の`文書~木に属する子~閲覧文脈$のうち,[ その`閲覧文脈~名$ ~EQ %名前 ]なるもの ◎ document-tree child browsing contexts of the active document whose name is name;
- %文書 内の`有名~要素$のうち,[ その`要素~名$ ~EQ %名前 ]なるもの ◎ embed, form, frameset, img, or object elements that have a name content attribute whose value is name and are in a document tree with the active document as their root; and ◎ HTML elements that have an id content attribute whose value is name and are in a document tree with the active document as their root.
7.3.4. ~garbage収集と閲覧文脈
~UAは、各[ `~top-level閲覧文脈$ ]への強い参照を持つ。 ◎ ↓
各 `閲覧文脈$ %B は、[ 各[ %B に`属する文書$ ], %B の `WindowProxy$I ~obj ]への強い参照を持つ ◎ A browsing context has a strong reference to each of its Documents and its WindowProxy object, and the user agent itself has a strong reference to its top-level browsing contexts.
各`文書$は、それを`結付けている~window$への強い参照を持つ。 ◎ A Document has a strong reference to its Window object.
注記: `~window$は、その `document$m 属性を通して,それに`結付けられている文書$への`強い参照$を持つ。 したがって、他の~scriptからの,それらいずれかの~objへの参照は、両者とも存続させ続けることになる。 同様に、[ `文書$, `~window$ ]のいずれも, `WindowProxy$I ~objへの暗黙の`強い参照$を持つ。 ◎ A Window object has a strong reference to its Document object through its document attribute. Thus, references from other scripts to either of those objects will keep both alive. Similarly, both Document and Window objects have implied strong references to the WindowProxy object.
各`~script$は、自身の`設定群~obj$への強い参照を持つ。 各 `環境~設定群~obj$は、自身の[ `大域~obj$, `担当の閲覧文脈$enV, `担当の文書$enV ]への強い参照を持つ(もしあれば)。 ◎ Each script has a strong reference to its settings object, and each environment settings object has strong references to its global object, responsible browsing context, and responsible document (if any).
`文書を破棄する@ ときは、所与の ( `文書$ %文書 ) に対し,次を走らせ~MUST: ◎ To discard a Document document:
- 【~Assert: %文書 が`属する閲覧文脈$ ~NEQ ε 】
- %文書 の`回復可能~状態$ ~SET ~F ◎ Set document's salvageable state to false.
- この仕様も含む`適用-可能な仕様$に定義される`文書~unload時の片付け手続き$があれば、それらの各~手続きを %文書 を渡して走らす ◎ Run any unloading document cleanup steps for document that are defined by this specification and other applicable specifications.
- `文書を中止する$( %文書 ) ◎ Abort document.
- ~queueされた`~task$のうち,[ それに結付けられている`文書$ ~EQ %文書 ]なるものは、どの`~task源$からの~taskであれ,走らすことなく除去する ◎ Remove any tasks associated with document in any task source, without running those tasks.
- %文書 を`通して入子にされ$ている ~EACH( `子~閲覧文脈$ %B ) に対し ⇒ `閲覧文脈を破棄する$( %B ) ◎ Discard all the child browsing contexts of document.
- %文書 が`属する閲覧文脈$から %文書 への強い参照を断ち切る ◎ Lose the strong reference from document's browsing context to document.
- ~EACH( `WorkerGlobalScope$I ~obj %G ) に対し ⇒ %G の`所有者~集合$から( %文書 を包含していれば) %文書 を`除去する$ ◎ Remove document from the owner set of each WorkerGlobalScope object whose set contains document.
`閲覧文脈を破棄する@ ときは、所与の ( `閲覧文脈$ %B ) に対し,次をし~MUST: ◎ When a browsing context is discarded,\
- ~UA自身から %B への強い参照を断ち切る ◎ the strong reference from the user agent itself to the browsing context must be severed, and\
- [ `属する閲覧文脈$ ~EQ %B ]を満たす ~EACH( %文書 ) に対し ⇒ `文書を破棄する$( %文書 ) ◎ all the Document objects for all the entries in the browsing context's session history must be discarded as well.
~UAは: ◎ ↓
- `~top-level閲覧文脈$をいつでも`破棄-$してよい(概して,利用者からの要請に呼応して — 例えば、利用者が,`~top-level閲覧文脈$たちを包含している~window~UIを強制的に閉じたとき)。 ◎ User agents may discard top-level browsing contexts at any time (typically, in response to user requests, e.g. when a user force-closes a window containing one or more top-level browsing contexts).\
-
他の`閲覧文脈$に対しては、次のときには`破棄-$し~MUST: ◎ Other browsing contexts must be discarded\
- その`WindowProxy$I ~objが~garbage収集に適格になったとき ◎ once their WindowProxy object is eligible for garbage collection,\
- この仕様が他所にて破棄するよう要求する所 ◎ in addition to the other places where this specification requires them to be discarded.
`WindowProxy$I ~obj %P は、 %P を伴って作成された`閲覧文脈$への強い参照は持たない。 特に、~JS~codeが %P への参照を保持していても,`入子の閲覧文脈$は`破棄-$され得る。 ◎ A WindowProxy does not have a strong reference to the browsing context it was created alongside. In particular, it is possible for a nested browsing context to be discarded even if JavaScript code holds a reference to its WindowProxy object.
7.3.5. 閲覧文脈を閉じるとき
`閲覧文脈を閉じる@ ときは、所与の ( `閲覧文脈$ %B ) に対し,次を走らす: ◎ To close a browsing context browsingContext, run these steps:
- %文書 ~LET %B にて`作動中の文書$ ◎ ↓
- `文書の~unloadを~promptする$( %文書 ) ⇒ ~IF[ 利用者は %文書 の`~unloadを拒否-$した ] ⇒ ~RET ◎ Prompt to unload browsingContext's active document. If the user refused to allow the document to be unloaded, then return.
- `文書を~unloadする$( %文書 ) ◎ Unload browsingContext's active document with the recycle parameter set to false.
- ~UIから %B を除去する (例: ~tab付き~browserにて当の~tabを閉じる/隠すなど。) ◎ Remove browsingContext from the user interface (e.g., close or hide its tab in a tabbed browser).
- `閲覧文脈を破棄する$( %B ) ◎ Discard browsingContext.
~UAは、どの`~top-level閲覧文脈$に対しても,利用者が任意に`閲覧文脈を閉じる$能を提供するべきである。 ◎ User agents should offer users the ability to arbitrarily close any top-level browsing context.
7.3.6. ~browser~UI要素
~Web頁を~Web~browserに統合できるようにするため、ある種の~Web~browser~UI要素は,~Web頁~内の~scriptに対し制限された仕方で公開される。 ◎ To allow Web pages to integrate with Web browsers, certain Web browser interface elements are exposed in a limited way to scripts in Web pages.
各~UI要素は、 `BarProp$I ~objにより表現される: ◎ Each interface element is represented by a BarProp object:
[Exposed=Window] interface `BarProp@I { readonly attribute boolean `visible$m; };
- %window . `locationbar$m . `visible$m
- %window . `menubar$m . `visible$m
- %window . `personalbar$m . `visible$m
- %window . `scrollbars$m . `visible$m
- %window . `statusbar$m . `visible$m
- %window . `toolbar$m . `visible$m
- 順に,[ location-, menu-, personal-, scroll-, status-, tool- ]bar が[ 可視ならば ~T / 可視でないならば ~F ]を返す。
- `visible@m
- 取得子は、 ~T または,下に述べるように,当の~objが表現する~UI要素の可視性~状態を最も正確aに表現するような,~UAにより決定される値を返さ~MUST。 ◎ The visible attribute, on getting, must return either true or a value determined by the user agent to most accurately represent the visibility state of the user interface element that the object represents, as described below.
-
以下に挙げる各種 `BarProp$I ~objは、`閲覧文脈$に属する各`文書$に存在する。 これらの~objにより表現される~UI要素のうち一部は、~UAによっては等価なものがないこともある。 そのような~UAであっても、他から指定されない限り,~objは在するかつ可視であるかのように動作し~MUST(すなわち,その `visible$m 属性は ~T を返さ~MUST)。 ◎ The following BarProp objects exist for each Document object in a browsing context. Some of the user interface elements represented by these objects might have no equivalent in some user agents; for those user agents, except when otherwise specified, the object must act as if it was present and visible (i.e. its visible attribute must return true).
- `~location-bar@bP ◎ The location bar BarProp object
- [ `作動中の文書$の`~URL$を表示する~control ]を包含するような~UI要素に類するものを表現する。 ◎ Represents the user interface element that contains a control that displays the URL of the active document, or some similar interface concept.
- `~menu-bar@bP ◎ The menu bar BarProp object
- [ ~menu~form内の~commandの~list ]を包含するような~UI要素に類するものを表現する。 ◎ Represents the user interface element that contains a list of commands in menu form, or some similar interface concept.
- `~personal-bar@bP ◎ The personal bar BarProp object
- [ 利用者の “お気に入り( favorite )” 頁を指す~link ]を包含するような~UI要素に類するものを表現する。 ◎ Represents the user interface element that contains links to the user's favorite pages, or some similar interface concept.
- `~scrollbar@bP ◎ The scrollbar BarProp object
- [ ~scrollするための仕組み ]を包含するような~UI要素に類するものを表現する。 ◎ Represents the user interface element that contains a scrolling mechanism, or some similar interface concept.
- `~status-bar@bP ◎ The status bar BarProp object
- 利用者の媒体に応じて適切に,文書の直上/直下に見出される~UI要素を表現する。 それは概して,[ 進行中の~network活動や, 利用者の~pointing装置が現在の指示している要素 ]についての情報を供する。 そのような~UI要素を持たない~UAは、~objに対応する~UI要素は不在であったかのように動作してよい(すなわち,その `visible$m 属性は ~F を返してよい)。 ◎ Represents a user interface element found immediately below or after the document, as appropriate for the user's media, which typically provides information about ongoing network activity or information about elements that the user's pointing device is current indicating. If the user agent has no such user interface element, then the object may act as if the corresponding user interface element was absent (i.e. its visible attribute may return false).
- `~toolbar@bP ◎ The toolbar BarProp object
- 利用者の媒体に応じて適切に,文書の直上/直下に見出される~UI要素を表現する。 それは概して,`~session履歴$の走査~control(戻る/進む~button, 再読込み~button, 等々)を供する。 そのような~UI要素を持たない~UAは、~objに対応する~UI要素は不在であったかのように動作してよい(すなわち,その `visible$m 属性は ~F を返してよい)。 ◎ Represents the user interface element found immediately above or before the document, as appropriate for the user's media, which typically provides session history traversal controls (back and forward buttons, reload buttons, etc). If the user agent has no such user interface element, then the object may act as if the corresponding user interface element was absent (i.e. its visible attribute may return false).
- `locationbar@m
- 取得子は、`~location-bar$bPを返さ~MUST。 ◎ The locationbar attribute must return the location bar BarProp object.
- `menubar@m
- 取得子は、`~menu-bar$bPを返さ~MUST。 ◎ The menubar attribute must return the menu bar BarProp object.
- `personalbar@m
- 取得子は、`~personal-bar$bPを返さ~MUST。 ◎ The personalbar attribute must return the personal bar BarProp object.
- `scrollbars@m
- 取得子は、`~scrollbar$bPを返さ~MUST。 ◎ The scrollbars attribute must return the scrollbar BarProp object.
- `statusbar@m
- 取得子は、`~status-bar$bPを返さ~MUST。 ◎ The statusbar attribute must return the status bar BarProp object.
- `toolbar@m
- 取得子は、`~toolbar$bPを返さ~MUST。 ◎ The toolbar attribute must return the toolbar BarProp object.
- `status@m
- この属性は、歴史的~理由から存在する。 取得子は、最後に設定された文字列を返さ~MUST。 設定子は、自身を新たな値に設定し~MUST。 `~window$の作成-時には、属性は空~文字列に設定され~MUST。 この属性は、他に何もしない。 ◎ For historical reasons, the status attribute on the Window object must, on getting, return the last string it was set to, and on setting, must set itself to the new value. When the Window object is created, the attribute must be set to the empty string. It does not do anything else.
7.3.7. `Window^I ~obj用の~script設定群
~UAは, `~window用に環境~設定群~objを設定しておく@ ことが要求されたときは、所与の ( `~JS実行~文脈$ %実行~文脈, `環境$ %予約-済み環境 (省略時は ε ) ) に対し,次を走らせ~MUST: ◎ When the user agent is required to set up a window environment settings object, given a JavaScript execution context execution context and an optional environment reserved environment, it must run the following steps:
- %realm ~LET %実行~文脈 の Realm 成分の値 ◎ Let realm be the value of execution context's Realm component.
- %window ~LET %realm の`大域~obj$relem ◎ Let window be realm's global object.
- %url ~LET %window に`結付けられている文書$の`~URL$docの複製 ◎ Let url be a copy of the URL of window's associated Document.
-
%設定群~obj ~LET 各種~algoが次のように定義される,新たな`環境~設定群~obj$ — 以下における %現~文書 とは、~algoが呼出された時点で %window に`結付けられている文書$を表すとする: ◎ Let settings object be a new environment settings object whose algorithms are defined as follows:
- `~realm実行~文脈$enV ◎ The realm execution context
- ~RET %実行~文脈 ◎ Return execution context.
- `~module~map$enV ◎ The module map
- ~RET %現~文書 の`~module~map$doc ◎ Return the module map of window's associated Document.
- `担当の閲覧文脈$enV ◎ The responsible browsing context
- ~RET %window に`対応する閲覧文脈$ ◎ Return the browsing context with which window is associated.
- `担当の~event-loop$enV ◎ The responsible event loop
- ~RET `担当の閲覧文脈$enVが所属している[ `互いに関係するかつ生成元も類似する閲覧文脈~群$ ]に結付けられている`~event-loop$ ◎ Return the event loop that is associated with the unit of related similar-origin browsing contexts to which window's browsing context belongs.
- `担当の文書$enV ◎ The responsible document
- ~RET %現~文書 ◎ Return window's associated Document.
- `~API用~URL文字~符号化法$enV ◎ The API URL character encoding
- ~RET %現~文書 の現在の`文字~符号化法$doc ◎ Return the current character encoding of window's associated Document.
- `~API用~基底~URL$enV ◎ The API base URL
- ~RET %現~文書 の現在の`基底~URL$doc ◎ Return the current base URL of window's associated Document.
- `生成元$enV ◎ The origin
- ~RET %現~文書 の`生成元$ ◎ Return the origin of window's associated Document.
- `~HTTPS状態$enV ◎ The HTTPS state
- ~RET %現~文書 の`~HTTPS状態$doc ◎ Return the HTTPS state of window's associated Document.
- `~referrer施策$enV ◎ The referrer policy
-
- %文書 ~LET %現~文書 ◎ Let document be the Document with which window is currently associated.
- ~WHILE[ %文書 は`~iframe-srcdoc文書$である ]~AND[ %文書 の`~referrer施策$doc ~EQ 空~文字列 ] ⇒ %文書 ~SET %文書 が`属する閲覧文脈$の`閲覧文脈~容器$の`~node文書$ ◎ While document is an iframe srcdoc document and document's referrer policy is the empty string, set document to document's browsing context's browsing context container's node document.
- ~RET %文書 の`~referrer施策$doc ◎ Return document's referrer policy.
-
~IF[ %予約-済み環境 ~NEQ ε ]: ◎ If reserved environment is given, then:
- %設定群~obj の ( `~id$enV, `作成時の~URL$enV, `~target閲覧文脈$enV, `作動中の~service-worker$enV ) ~SET %予約-済み環境 の ( それら ) ◎ Set settings object's id to reserved environment's id, settings object's creation URL to reserved environment's creation URL, settings object's target browsing context to reserved environment's target browsing context, and settings object's active service worker to reserved environment's active service worker.
-
%予約-済み環境 の`~id$enV ~SET 空~文字列 ◎ Set reserved environment's id to the empty string.
注記: この時点から、 %予約-済み環境 の~id( identity )は %設定群~obj に全部的に転送されたものと見なされ、`環境$の`~id$enVにより探索し得なくなる。 ◎ The identity of the reserved environment is considered to be fully transferred to the created environment settings object. The reserved environment is not searchable by the environment’s id from this point on.
- ~ELSE ⇒ %設定群~obj の ⇒# `~id$enV ~SET 新たな一意かつ不透明な文字列, `作成時の~URL$enV ~SET %~url, `~target閲覧文脈$enV ~SET ~NULL, `作動中の~service-worker$enV ~SET ~NULL ◎ Otherwise, set settings object's id to a new unique opaque string, settings object's creation URL to url, settings object's target browsing context to null, and settings object's active service worker to null.
- %realm の `HostDefined^sl ~field ~SET %設定群~obj ◎ Set realm's [[HostDefined]] field to settings object.
- ~RET %設定群~obj ◎ Return settings object.
7.4. `WindowProxy^I ~exotic~obj
各 `閲覧文脈$ %B には、 `WindowProxy@I ~obj %P が結付けられる。 それは、普通の~objである `Window$I ~obj %W を,次のように包装する~exotic~objである:
- %P 上のほとんどの演算は、 %W へ指し向けられる。
- %B が`~navigate$されたときは、 %W も別の `Window$I ~objに変更される。
- %P の `Window@sl 内部~slotが, %W を表現する。
- %P に対応する`~interface~obj$はない。
【 以下,この節と その各 下位節の内容は、 別ページ にて。 上述は、便宜のため,その冒頭部のみを再掲したものである。 】