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 1 when parsed as an integer.

Fixes #2600.
  • Loading branch information
cdumez committed Oct 10, 2018
1 parent 5fabb58 commit c3fa4e6
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 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,15 @@ 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, return true.</p></li>
<li><p>If <var>value</var> is a case-sensitive match for <code data-x="">yes</code>, 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 1, return true, otherwise return false.</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 c3fa4e6

Please sign in to comment.