Skip to content

Commit 055e6b7

Browse files
authored
Normalize the target attribute to a string
This ends up fixing a bug as sometimes "The rules for choosing a browsing context" would be invoked with name being null rather than the empty string and would therefore not end up using the "_self" code path while it should.
1 parent 1fcbe87 commit 055e6b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13041,7 +13041,7 @@ interface <dfn>HTMLBaseElement</dfn> : <span>HTMLElement</span> {
1304113041
<code data-x="attr-base-target">target</code> attribute of the first such <code>base</code>
1304213042
element.</p></li>
1304313043

13044-
<li><p>Return null.</p></li>
13044+
<li><p>Return the empty string.</p></li>
1304513045
</ol>
1304613046

1304713047
<hr>
@@ -23025,7 +23025,7 @@ document.body.appendChild(wbr);</pre>
2302523025
<li><p>Let <var>source</var> be <var>subject</var>'s <span>node document</span>'s <span
2302623026
data-x="concept-document-bc">browsing context</span>.</p></li>
2302723027

23028-
<li><p>Let <var>targetAttributeValue</var> be null.</p></li>
23028+
<li><p>Let <var>targetAttributeValue</var> be the empty string.</p></li>
2302923029

2303023030
<li><p>If <var>subject</var> is an <code>a</code> or <code>area</code> element, then set
2303123031
<var>targetAttributeValue</var> to the result of <span data-x="get an element's target">getting
@@ -77581,9 +77581,9 @@ console.assert(iframeWindow.frameElement === null);
7758177581
<hr>
7758277582

7758377583
<p><dfn id="the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name">The rules for
77584-
choosing a browsing context</dfn>, given null or a <span>browsing context name</span>
77585-
<var>name</var>, a <span>browsing context</span> <var>current</var>, and a
77586-
boolean <var>noopener</var> are as follows:</p>
77584+
choosing a browsing context</dfn>, given a <span>browsing context name</span> <var>name</var>, a
77585+
<span>browsing context</span> <var>current</var>, and a boolean <var>noopener</var> are as
77586+
follows:</p>
7758777587

7758877588
<ol>
7758977589
<li><p>Let <var>chosen</var> be null.</p></li>
@@ -77658,7 +77658,7 @@ console.assert(iframeWindow.frameElement === null);
7765877658
browsing context</span> being <var>current</var>, and set <var>new</var> to true. If
7765977659
<var>name</var> is not an <span>ASCII case-insensitive</span> match for "<code
7766077660
data-x="">_blank</code>", then <var>chosen</var>'s <span data-x="browsing context
77661-
name">name</span> must be set to <var>name</var> (otherwise, it has no name).</p>
77661+
name">name</span> must be set to <var>name</var>.</p>
7766277662

7766377663
<p class="note">If the newly created <span>browsing context</span> is immediately <span
7766477664
data-x="navigate">navigated</span>, then the navigation will be done with <span>replacement

0 commit comments

Comments
 (0)