diff --git a/source b/source index c333ce2332c..1e660566f1a 100644 --- a/source +++ b/source @@ -23692,8 +23692,9 @@ document.body.appendChild(wbr); not allowed Annotation · - Indicates that any browsing context created by following the hyperlink is - disowned. + Creates a top-level browsing context that is not an auxiliary + browsing context if the hyperlink would create either of those to begin with (i.e., has + an appropriate target attribute value). @@ -23701,9 +23702,8 @@ document.body.appendChild(wbr); not allowed Annotation · - Indicates that any browsing context created by following the hyperlink is - disowned and will not get a `Referer` (sic) - header. + No `Referer` (sic) header will be included. + Additionally, has the same effect as noopener. @@ -24452,9 +24452,32 @@ document.body.appendChild(wbr); data-x="hyperlink annotation">annotates any other hyperlinks created by the element (the implied hyperlink, if no other keywords create one).

-

The keyword indicates that any newly created browsing context which results from - following the hyperlink will be disowned, which means that its window.opener attribute will be null.

+

The keyword indicates that any newly created top-level browsing context which + results from following the hyperlink is not an auxiliary browsing + context. E.g., its window.opener attribute will be + null.

+ +

See also the processing model where the branching between + an auxiliary browsing context and a top-level browsing context is + defined.

+ +
+

This typically creates an auxiliary browsing context (assuming there is no + existing browsing context whose browsing context name is + "example"):

+ +
<a href=help.html target=example>Help!</a>
+ +

This creates a top-level browsing context that is not an auxiliary browsing + context (assuming the same thing):

+ +
<a href=help.html target=example rel=noopener>Help!</a>
+ +

These are equivalent and only navigate the parent browsing context:

+ +
<a href=index.html target=_parent>Home</a>
+
<a href=index.html target=_parent rel=noopener>Home</a>
+
Link type "noreferrer"
@@ -76923,6 +76946,11 @@ dictionary DragEventInit : MouseEventInit {

A browsing context has a corresponding WindowProxy object.

+

A browsing context has an opener browsing context, which + is null or a browsing context. It is initially null.

+ +

A browsing context can be disowned.

+

A browsing context has a session history, which lists the Document objects that the browsing context has presented, is presenting, or will present. A browsing context's active document is @@ -77132,10 +77160,10 @@ dictionary DragEventInit : MouseEventInit { context">ancestor of B, or if the browsing context A is the parent browsing context of B.

-

A browsing context that is not a nested browsing context has no - parent browsing context, and is the top-level browsing - context of all the browsing contexts for which it is an ancestor browsing - context.

+

A browsing context that is not a nested browsing context, has no + parent browsing context, and whose opener browsing context is null, is + the top-level browsing context of all the browsing contexts for which it + is an ancestor browsing context.

The transitive closure of parent browsing contexts for a browsing context that is a nested browsing context gives the list @@ -77287,31 +77315,28 @@ dictionary DragEventInit : MouseEventInit {

Navigating nested browsing contexts in the DOM
-
window . top
-
-

Returns the WindowProxy for the top-level browsing context.

+
+
window . opener
+
+

Returns the Window for the opener browsing context.

+ +

Returns null if there isn't one.

window . parent
-
-

Returns the WindowProxy for the parent browsing context.

-
window . frameElement
-
-

Returns the Element for the browsing context container.

Returns null if there isn't one, and in cross-origin situations.

-
@@ -77338,6 +77363,46 @@ dictionary DragEventInit : MouseEventInit { top-level browsing context's WindowProxy object.

+

The opener attribute's getter must run these + steps:

+ +
    +
  1. If the current browsing context is disowned, then return + null.

  2. + +
  3. If the current browsing context has no opener browsing context, + then return null.

  4. + +
  5. Return the current browsing context's opener browsing context's + WindowProxy object.

  6. +
+ +

The opener attribute's setter, must run these steps:

+ +
    +
  1. If the given value is null, then disown the current + browsing context and return.

  2. + +
  3. Return ? OrdinaryDefineOwnProperty(this Window object, "opener", { [[Value]]: the given value, [[Writable]]: true, [[Enumerable]]: true, + [[Configurable]]: true }).

  4. +
+ +
+

If a browsing context is disowned, its window.opener attribute is null. That prevents scripts in the + browsing context from changing any properties of its opener browsing + context's Window object (i.e., the Window object from which the + browsing context was created).

+ +

Otherwise, if a browsing context is not disowned, then scripts in + that browsing context can use window.opener to + change properties of its opener browsing context's Window object. For + example, a script running in the browsing context can change the value of window.opener.location, causing the opener browsing context to + navigate to a completely different document.

+
+

The parent IDL attribute, on getting, must run the following algorithm:

@@ -77415,58 +77480,8 @@ console.assert(iframeWindow.frameElement === null); context without being nested through an element. Such browsing contexts are called auxiliary browsing contexts. Auxiliary browsing contexts are always top-level browsing - contexts.

- -

An auxiliary browsing context has an opener browsing - context, which is the browsing context from which the auxiliary browsing - context was created.

- - -
Navigating auxiliary browsing contexts in the DOM
- -

An auxiliary browsing context can be disowned.

- -

The opener attribute's getter must run these - steps:

- -
    -
  1. If the current browsing context is disowned, then return - null.

  2. - -
  3. If the current browsing context has no opener browsing context, - then return null.

  4. - -
  5. Return the current browsing context's opener browsing context's - WindowProxy object.

  6. -
- -

The opener attribute's setter, must run these steps:

- -
    -
  1. If the given value is null, then disown the current - browsing context and return.

  2. - -
  3. Perform OrdinaryDefineOwnProperty(this Window object, "opener", { [[Value]]: the given value, [[Writable]]: true, [[Enumerable]]: true, - [[Configurable]]: true }). Rethrow any exceptions.

  4. -
- -
-

If a browsing context is disowned, its window.opener attribute is null. That prevents scripts in the - browsing context from changing any properties of its opener browsing - context's Window object (i.e., the Window object from which the - browsing context was created).

+ context">top-level browsing contexts.

-

Otherwise, if a browsing context is not disowned, then scripts in - that browsing context can use window.opener to - change properties of its opener browsing context's Window object. For - example, a script running in the browsing context can change the value of window.opener.location, causing the opener browsing context to - navigate to a completely different document.

-
@@ -78453,8 +78468,7 @@ dictionary WindowPostMessageOptions : PostMessageOptions -
  • If noopener is true, then disown target - browsing context and return null.

  • +
  • If noopener is true, then return null.

  • Return target browsing context's WindowProxy object.