Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change URL parsing sequence for window open steps #10683

Merged
merged 2 commits into from
Nov 15, 2024
Merged
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
45 changes: 20 additions & 25 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -89327,6 +89327,20 @@ dictionary <dfn dictionary>WindowPostMessageOptions</dfn> : <span>StructuredSeri
<li><p>Let <var>sourceDocument</var> be the <span>entry global object</span>'s <span
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>

<li><p>Let <var>urlRecord</var> be null.</p></li>

<li>
<p>If <var>url</var> is not the empty string, then:</p>

<ol>
<li><p>Set <var>urlRecord</var> to the result of <span>encoding-parsing a URL</span> given
annevk marked this conversation as resolved.
Show resolved Hide resolved
<var>url</var>, relative to <var>sourceDocument</var>.</p></li>

<li><p>If <var>urlRecord</var> is failure, then throw a <span>"<code>SyntaxError</code>"</span>
<code>DOMException</code>.</p></li>
</ol>
</li>

<li><p>If <var>target</var> is the empty string, then set <var>target</var> to "<code
data-x="">_blank</code>".</p></li>

Expand Down Expand Up @@ -89398,15 +89412,8 @@ dictionary <dfn dictionary>WindowPostMessageOptions</dfn> : <span>StructuredSeri
data-x="nav-bc">active browsing context</span> given
<var>tokenizedFeatures</var>. <ref>CSSOMVIEW</ref></p></li>

<li><p>Let <var>urlRecord</var> be the <span>URL record</span>
<code>about:blank</code>.</p></li>

<li><p>If <var>url</var> is not the empty string, then set <var>urlRecord</var> to the result
of <span>encoding-parsing a URL</span> given <var>url</var>, relative to the <span>entry
settings object</span>.</p></li>

<li><p>If <var>urlRecord</var> is failure, then throw a <span>"<code>SyntaxError</code>"</span>
<code>DOMException</code>.</p></li>
<li><p>If <var>urlRecord</var> is null, then set <var>urlRecord</var> to a <span>URL
record</span> representing <code>about:blank</code>.</p></li>

<li>
<p>If <var>urlRecord</var> <span>matches <code>about:blank</code></span>, then perform the
Expand All @@ -89429,22 +89436,10 @@ dictionary <dfn dictionary>WindowPostMessageOptions</dfn> : <span>StructuredSeri
<p>Otherwise:</p>

<ol>
<li>
<p>If <var>url</var> is not the empty string, then:</p>

<ol>
<li><p>Let <var>urlRecord</var> be the result of <span>encoding-parsing a URL</span>
<var>url</var>, relative to the <span>entry settings object</span>.</p></li>

<li><p>If <var>urlRecord</var> is failure, then throw a
<span>"<code>SyntaxError</code>"</span> <code>DOMException</code>.</p></li>

<li><p><span>Navigate</span><!--DONAV window.open()--> <var>targetNavigable</var> to
<var>urlRecord</var> using <var>sourceDocument</var>, with <i
data-x="navigation-referrer-policy">referrerPolicy</i> set to <var>referrerPolicy</var> and
<i><span>exceptionsEnabled</span></i> set to true.</p></li>
</ol>
</li>
<li><!--DONAV window.open()--><p>If <var>urlRecord</var> is not null, then
<span>navigate</span> <var>targetNavigable</var> to <var>urlRecord</var> using
<var>sourceDocument</var>, with <i data-x="navigation-referrer-policy">referrerPolicy</i> set
to <var>referrerPolicy</var> and <i><span>exceptionsEnabled</span></i> set to true.</p></li>

<li><p>If <var>noopener</var> is false, then set <var>targetNavigable</var>'s <span
data-x="nav-bc">active browsing context</span>'s <span>opener browsing context</span> to
Expand Down