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

Fix url and src in NotRestoredReasons #10916

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
41 changes: 29 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -96948,10 +96948,10 @@ interface <dfn interface>NotRestoredReasonDetails</dfn> {

[Exposed=Window]
interface <dfn interface>NotRestoredReasons</dfn> {
readonly attribute DOMString? <span data-x="dom-not-restored-reasons-src">src</span>;
readonly attribute USVString? <span data-x="dom-not-restored-reasons-src">src</span>;
readonly attribute DOMString? <span data-x="dom-not-restored-reasons-id">id</span>;
readonly attribute DOMString? <span data-x="dom-not-restored-reasons-name">name</span>;
readonly attribute DOMString? <span data-x="dom-not-restored-reasons-url">url</span>;
readonly attribute USVString? <span data-x="dom-not-restored-reasons-url">url</span>;
readonly attribute FrozenArray&lt;<span>NotRestoredReasonDetails</span>&gt;? <span data-x="dom-not-restored-reasons-reasons">reasons</span>;
readonly attribute FrozenArray&lt;<span>NotRestoredReasons</span>&gt;? <span data-x="dom-not-restored-reasons-children">children</span>;
[Default] object toJSON();
Expand Down Expand Up @@ -97395,7 +97395,8 @@ interface <dfn interface>NotRestoredReasons</dfn> {
the following <span data-x="struct item">items</span>:</p>

<ul>
<li><p><dfn data-x="nrr-src">src</dfn>, a string or null, initially null.</p></li>
<li><p><dfn data-x="nrr-src">src</dfn>, a <span>scalar value string</span> or null, initially
null.</p></li>

<li><p><dfn data-x="nrr-id">id</dfn>, a string or null, initially null.</p></li>

Expand Down Expand Up @@ -104757,22 +104758,38 @@ location.href = '#foo';</code></pre>
<li><p>Set <var>notRestoredReasonsForDocument</var>'s <span data-x="nrr-url">URL</span> to
<var>document</var>'s <span data-x="concept-document-url">URL</span>.</p></li>

<li><p>Let <var>container</var> be <var>document</var>'s <span>node navigable</span>'s <span
data-x="nav-container">container</span>.</p></li>

<li>
<p>If <var>document</var>'s <span>node navigable</span>'s <span
data-x="nav-container">container</span> is an <code>iframe</code> element, then:</p>
<p>If <var>container</var> is an <code>iframe</code> element:</p>

<ol>
<li><p>Let <var>src</var> be the empty string.</p></li>

<li>
<p>If <var>container</var> has a <code data-x="dom-iframe-src">src</code> attribute:</p>

<ol>
<li><p>Let <var>src</var> be the result of <span>encoding-parsing-and-serializing a
URL</span> given <var>container</var>'s <code data-x="attr-iframe-src">src</code> attribute's
value, relative to <var>container</var>'s <span>node document</span>.</p></li>

<li><p>If <var>src</var> is failure, then set <var>src</var> to <var>container</var>'s <code
data-x="attr-iframe-src">src</code> attribute's value.</p></li>
</ol>
</li>

<li><p>Set <var>notRestoredReasonsForDocument</var>'s <span data-x="nrr-src">src</span> to
the value of <var>document</var>'s <span>node navigable</span>'s <span
data-x="nav-container">container</span>'s <code data-x="attr-iframe-src">src</code> attribute.</p></li>
<var>src</var>.</p></li>

<li><p>Set <var>notRestoredReasonsForDocument</var>'s <span data-x="nrr-id">id</span> to
the value of <var>document</var>'s <span>node navigable</span>'s <span
data-x="nav-container">container</span>'s <code data-x="attr-id">id</code> attribute.</p></li>
<var>container</var>'s <code data-x="attr-id">id</code> attribute's value, or the empty string
if it has no such attribute.</p></li>

<li><p>Set <var>notRestoredReasonsForDocument</var>'s <span data-x="nrr-name">name</span>
to the value of <var>document</var>'s <span>node navigable</span>'s <span
data-x="nav-container">container</span>'s <code data-x="attr-iframe-name">name</code> attribute.</p></li>
<li><p>Set <var>notRestoredReasonsForDocument</var>'s <span data-x="nrr-name">name</span> to
<var>container</var>'s <code data-x="attr-iframe-name">name</code> attribute's value, or the
empty string if it has no such attribute.</p></li>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why empty string? https://html.spec.whatwg.org/#nrr-struct defaults to null anyhow.

</ol>
</li>

Expand Down