Skip to content

Commit

Permalink
Remove noopener/noreferrer from tokenizedFeatures
Browse files Browse the repository at this point in the history
Otherwise CSSOM will assume it's more than a new window and treat it like a popup or some such.

Helps with #1902.

Tests: web-platform-tests/wpt#16330 & web-platform-tests/wpt#16658.
  • Loading branch information
annevk authored May 3, 2019
1 parent 7bb0227 commit c0b75ea
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -78670,15 +78670,33 @@ dictionary <dfn>WindowPostMessageOptions</dfn> : <span>PostMessageOptions</span>

<li><p>Let <var>noopener</var> and <var>noreferrer</var> be false.</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>", then set <var>noopener</var> to the result of <span
data-x="concept-window-open-features-parse-boolean">parsing
<var>tokenizedFeatures["noopener"]</var> as a boolean feature</span>.</p></li>

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

<ol>
<li><p>Set <var>noopener</var> to the result of <span
data-x="concept-window-open-features-parse-boolean">parsing <var>tokenizedFeatures</var>["<code
data-x="">noopener</code>"] as a boolean feature</span>.</p></li>

<li><p><span data-x="map remove">Remove</span> <var>tokenizedFeatures</var>["<code
data-x="">noopener</code>"].</p></li>
</ol>
</li>

<li>
<p>If <var>tokenizedFeatures</var>["<code data-x="">noreferrer</code>"] <span data-x="map
exists">exists</span>, then:</p>

<ol>
<li><p>Set <var>noreferrer</var> to the result of <span
data-x="concept-window-open-features-parse-boolean">parsing <var>tokenizedFeatures</var>["<code
data-x="">noreferrer</code>"] as a boolean feature</span>.</p></li>

<li><p><span data-x="map remove">Remove</span> <var>tokenizedFeatures</var>["<code
data-x="">noreferrer</code>"].</p></li>
</ol>
</li>

<li><p>If <var>noreferrer</var> is true, then set <var>noopener</var> to true.</p></li>

Expand Down

0 comments on commit c0b75ea

Please sign in to comment.