Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 60 additions & 30 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -20973,6 +20973,11 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {

</li>

<li><p>If <var>subject</var>'s <a href="#linkTypes">link types</a> include the <code
data-x="rel-noreferrer">noreferrer</code> or <code data-x="rel-noopener">noopener</code> keyword,
and <var>replace</var> is true, then <span data-x="disowned its opener">disown
<var>target</var>'s opener</span>.</p></li>

<li><p><span data-x="resolve a url">Resolve</span> the <span>URL</span> given by
<var>subject</var>'s <code data-x="attr-hyperlink-href">href</code> attribute, relative to
<var>subject</var>.</p></li>
Expand Down Expand Up @@ -21472,6 +21477,13 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
<td>Requires that the user agent not send an HTTP `<code data-x="http-referer">Referer</code>` (sic) header if the user follows the hyperlink.</td>
</tr>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an*

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!

<tr>
<td><code data-x="rel-noopener">noopener</code></td>
<td><em>not allowed</em></td>
<td><span data-x="hyperlink annotation">Annotation</span></td>
<td>Requires that any <span>browsing context</span> created by following the hyperlink must not have an <span>opener browsing context</span>.</td>
</tr>

<tr>
<td><code data-x="rel-pingback">pingback</code></td>
<td><span data-x="external resource link">External Resource</span></td>
Expand Down Expand Up @@ -21985,14 +21997,29 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
<span data-x="concept-request">request</span>'s <span
data-x="concept-request-referrer">referrer</span> to "<code data-x="">no-referrer</code>".</p>

<p>This keyword also <a href="#noopener">causes the <code data-x="dom-opener">opener</code>
attribute to remain null</a> if the hyperlink <span data-x="creating a new browsing context">creates</span> a new <span>browsing context</span>.</p>
<p class="note">For historical reasons, the <code data-x="rel-noreferrer">noreferrer</code>
keyword implies the behavior associated with the <code data-x="rel-noopener">noopener</code>
keyword when present on a hyperlink that <span data-x="creating a new browsing
context">creates</span> a new <span>browsing context</span>. That is, <code data-x="">&lt;a
href="..." rel="noreferrer" target="_blank"&gt;</code> has the same behavior as <code
data-x="">&lt;a href="..." rel="noreferrer noopener" target="_blank"&gt;</code>.</p>

</div>

<!-- v2: Would be nice to apply this to other elements too, e.g. letting <img> or CSS or <video>
hide the referrer -->

<h5>Link type "<dfn><code data-x="rel-noopener">noopener</code></dfn>"</h5>

<p>The <code data-x="rel-noopener">noopener</code> keyword may be used with <code>a</code> and
<code>area</code> elements. This keyword does not create a <span>hyperlink</span>, but <span
data-x="hyperlink annotation">annotates</span> any other hyperlinks created by the element (the
implied hyperlink, if no other keywords create one).</p>

<p>The keyword indicates that any newly created <span>browsing context</span> which results from
following the <span>hyperlink</span> will not have an <span>opener browsing context</span>, which
means that its <code data-x="dom-opener">window.opener</code> property will be <code
data-x="">null</code>.</p>

<h5>Link type "<dfn><code data-x="rel-pingback">pingback</code></dfn>"</h5>

Expand Down Expand Up @@ -78394,33 +78421,19 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {


<dt id="noopener">If the user agent has been configured such that in this instance it will
create a new browsing context, and the browsing context is being requested as part of <span
data-x="following hyperlinks">following a hyperlink</span> whose <a href="#linkTypes">link
types</a> include the <code data-x="rel-noreferrer">noreferrer</code> keyword</dt>

<dd><p>A new <span>top-level browsing context</span> must be <span data-x="creating a new browsing context">created</span>. If the given browsing
context name is not <code data-x="">_blank</code>, then the new top-level browsing context's
name must be the given browsing context name (otherwise, it has no name). The chosen browsing
context must be this new browsing context. The creation of such a <span>browsing context</span>
is <dfn>a new start for session storage</dfn>.</p>

<p class="note">If it is immediately <span data-x="navigate">navigated</span>, then the
navigation will be done with <span>replacement enabled</span>.</p></dd>


<dt>If the user agent has been configured such that in this instance it will create a new
browsing context, and the <code data-x="rel-noreferrer">noreferrer</code> keyword doesn't
apply</dt>

<dd><p>A new <span>auxiliary browsing context</span> must be created, with the <span>opener
browsing context</span> being the current one. If the given browsing context name is not <code
data-x="">_blank</code>, then the new auxiliary browsing context's name must be the given
browsing context name (otherwise, it has no name). The chosen browsing context must be this new
browsing context.</p>

<p class="note">If it is immediately <span data-x="navigate">navigated</span>, then the
navigation will be done with <span>replacement enabled</span>.</p></dd>
create a new browsing context:</dt>

<dd>
<p>A new <span>auxiliary browsing context</span> must be created, with the <span>opener
browsing context</span> being the current one. If the given browsing context name is not
<code data-x="">_blank</code>, then the new auxiliary browsing context's name must be the
given browsing context name (otherwise, it has no name). The chosen browsing context must be
this new browsing context.</p>

<p class="note">If the newly created <span>browsing context</span> is immediately <span
data-x="navigate">navigated</span>, then the navigation will be done with <span>replacement
enabled</span>.</p>
</dd>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deduplicate this note by placing it below the </dl> and precede it with "Either way, if it is..."?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactoring this completely.


<dt>If the user agent has been configured such that in this instance it will reuse the current
browsing context</dt>
Expand Down Expand Up @@ -78826,8 +78839,23 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

</li>

<li><p><i>End</i>: Return the <code>WindowProxy</code> object of <var>target browsing
context</var>.</p></li>

<li>
<p><i>End</i>:</p>

<ol>

<li><p>If the result of <span data-x="split a string on commas">splitting <var>features</var>
on commas</span> contains the token "<code data-x="">noopener</code>", <span data-x="disowned
its opener">disown <var>target browsing context</var>'s opener</span>, and return <code
data-x="">null</code>.</p></li>

<li><p>Otherwise, return the <code>WindowProxy</code> object of <var>target browsing
context</var>.</p></li>

</ol>

</li>

</ol>

Expand Down Expand Up @@ -118105,6 +118133,7 @@ INSERT INTERFACES HERE
Charlene Wright,
Charles Iliya Krempeaux,
Charles McCathieNevile,
Charlie Reis,
Chris Apers,
Chris Cressman,
Chris Evans,
Expand Down Expand Up @@ -118594,6 +118623,7 @@ INSERT INTERFACES HERE
Sander van Lambalgen,
Sanjoy Pal,
Sarven Capadisli,
Scott Beardsley,
Scott Gonz&aacute;lez,
Scott Hess,
Sean Fraser,
Expand Down