Skip to content

Commit

Permalink
Specify parsing of 'noopener' feature in window.open
Browse files Browse the repository at this point in the history
Specify parsing of 'noopener' feature in window.open so that noopener is only set to true
if the value is either:
- The empty string.
- The string "yes".
- The value is not 0 or an error when parsed as an integer.

Fixes whatwg#2600.
  • Loading branch information
cdumez committed Oct 10, 2018
1 parent 5fabb58 commit 17c2642
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -78318,8 +78318,13 @@ interface <dfn data-export="" data-dfn-type="interface">Window</dfn> : <span>Eve
<li><p>Let <var>tokenizedFeatures</var> be the result of <span
data-x="concept-window-open-features-tokenize">tokenizing</span> <var>features</var>.</p></li>

<li><p>Let <var>noopener</var> be true if <var>tokenizedFeatures</var> <span data-x="map
exists">contains</span> an entry with the key "<code data-x="">noopener</code>"</p></li>
<li><p>If <var>tokenizedFeatures</var> <span data-x="map
exists">contains</span> an entry with the key "<code data-x="">noopener</code>":</p>
<ul>
<li><p>Let <var>noopener</var> be the result of <span
data-x="concept-window-open-features-parse-boolean">parsing <var>tokenizedFeatures["noopener"]</var>
as a boolean feature</span>.</p>
</ul></li>

<li>
<p>Let <var>target browsing context</var> and <var>new</var> be the result of applying <span>the
Expand Down Expand Up @@ -78477,6 +78482,17 @@ interface <dfn data-export="" data-dfn-type="interface">Window</dfn> : <span>Eve
<dd>Return <var>name</var>.
</dl>

<p>To <dfn data-x="concept-window-open-features-parse-boolean">parse a boolean feature</dfn> given a
string <var>value</var>:</p>
<ol>
<li><p>If <var>value</var> is the empty string then return true.</p></li>
<li><p>If <var>value</var> is a case-sensitive match for <code data-x="">yes</code> then return true.</p></li>
<li><p>Let <var>parsed</var> be the result of <span data-x="rules for parsing integers">parsing
<var>value</var> as an integer</span>.</p></li>
<li><p>If <var>parsed</var> is an error, set it to 0."</p></li>
<li><p>If <var>parsed</var> is 0 then return false, otherwise return true.</p></li>
</ol>

<hr>

<p>The <dfn><code data-x="dom-name">name</code></dfn> attribute of the <code>Window</code> object
Expand Down

0 comments on commit 17c2642

Please sign in to comment.