Skip to content

Commit

Permalink
take navigable as a param
Browse files Browse the repository at this point in the history
  • Loading branch information
rubberyuzu committed Jun 20, 2023
1 parent 61086ca commit 04780a9
Showing 1 changed file with 49 additions and 50 deletions.
99 changes: 49 additions & 50 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -89237,17 +89237,18 @@ data-x="dom-PreventedBackForwardCache-masked">masked</span>" };

[Exposed=Window]
interface <dfn interface>NotRestoredReasons</dfn> {
readonly attribute <span>PreventedBackForwardCache</span> <span
data-x="dom-not-restored-reasons-prevented-back-forward-cache">preventedBackForwardCache</span>;
readonly attribute DOMString? <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 ObservableArray&lt;DOMString&gt;? <dfn attribute for="NotRestoredReasons" data-x=
readonly attribute <span>PreventedBackForwardCache</span> <span
data-x="dom-not-restored-reasons-prevented-back-forward-cache">preventedBackForwardCache</span>;
readonly attribute DOMString? <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 ObservableArray&lt;DOMString&gt;? <dfn attribute for="NotRestoredReasons" data-x=
"dom-not-restored-reasons-reasons">reasons</dfn>;
readonly attribute ObservableArray&lt;<span>NotRestoredReasons</span>&gt;? <dfn attribute for="NotRestoredReasons" data-x="dom-not-restored-reasons-children">children</dfn>; };</code></pre>
readonly attribute ObservableArray&lt;<span>NotRestoredReasons</span>&gt;? <dfn attribute for="NotRestoredReasons" data-x="dom-not-restored-reasons-children">children</dfn>;
};</code></pre>

<dl>
<dl class="domintro">
<dt><code data-x=""><var>notRestoredReasons</var>.<span subdfn data-x= "dom-not-restored-reasons-prevented-back-forward-cache">preventedBackForwardCache </span></code></dt>
<dd><p>Returns whether the document has blocked back/forward cache, from the list below. This is
set to "<code data-x="dom-PreventedBackForwardcache-masked">masked</code>" if the document is in
Expand All @@ -89273,12 +89274,14 @@ interface <dfn interface>NotRestoredReasons</dfn> {
<dd><p>Returns the document's <span data-x="concept-document-url">URL</span>, or null if the
document is in a cross-origin <code>iframe</code>. This is reported in addition to <code
data-x="dom-not-restored-reasons-src">src</code> because it is possible <code>iframe</code>
navigated since the original src was set.</p></dd>
navigated since the original <code data-x="attr-iframe-src">src</code> was set.</p></dd>

<dt><code data-x=""><var>notRestoredReasons</var>.<span subdfn data-x="dom-not-restored-reasons-reasons">reasons</span></code></dt>
<dd><p>Returns an array of reasons that prevented the document from <a
href="#note-bfcache">being served from back/forward cache</a>. Each reason is a string from the
list below. This is null if the document is in a cross-origin <code>iframe</code>.</p></dd>
href="#note-bfcache">being served from back/forward cache</a>. This is null if the document
is in a cross-origin <code>iframe</code>. See the definition of <span
data-x="concept-document-bfcache-blocking-reasons">bfcache blocking reasons</span> for the possible
string values.</p></dd>

<dt><code data-x=""><var>notRestoredReasons</var>.<span subdfn data-x= "dom-not-restored-reasons-children">children</span></code></dt>
<dd><p>Returns an array of <code>NotRestoredReasons</code> that are for the document’s
Expand All @@ -89287,11 +89290,7 @@ interface <dfn interface>NotRestoredReasons</dfn> {

<p>A <code>NotRestoredReasons</code> object has a <dfn
data-x="concept-not-restored-reasons-prevented-bfcache-state">prevented bfcache state</dfn>,
a <code>PreventedBackForwardCache</code>, which is either "<code
data-x="dom-PreventedBackForwardCache-yes">yes</code>", "<code
data-x="dom-PreventedBackForwardCache-no">no</code>" or "<code
data-x="dom-PreventedBackForwardCache-masked">masked</code>", initially "<code
data-x="dom-PreventedBackForwardCache-masked">masked</code>".</p>
a <code>PreventedBackForwardCache</code>.</p>

<dl>
<dt>"<dfn enum-value for="PreventedBackForwardcache"><code subdfn data-x="dom-PreventedBackForwardCache-yes">yes</code></dfn>"</dt>
Expand Down Expand Up @@ -89336,7 +89335,7 @@ interface <dfn interface>NotRestoredReasons</dfn> {
<span>this</span>'s <span data-x="concept-not-restored-reasons-name">name</span>.</p>

<p>The <dfn attribute for="NotRestoredReasons"><code
data-x="dom-not-restored-reasons-url">URL</code></dfn> getter steps are to return
data-x="dom-not-restored-reasons-url">url</code></dfn> getter steps are to return
<span>this</span>'s <span data-x="concept-not-restored-reasons-url">URL</span>.</p>

<h3 split-filename="document-sequences">Infrastructure for sequences of documents</h3>
Expand Down Expand Up @@ -93513,7 +93512,7 @@ location.href = '#foo';</code></pre>

<li><p><span>Make document unsalvageable</span> given <var>entry</var>'s <span
data-x="she-document-state">document state</span>'s <span
data-x="document-state-document">document</span> and a"<code
data-x="document-state-document">document</span> and "<code
data-x="blocking-navigation-failure">navigation-failure</code>".</p></li>

<li>
Expand Down Expand Up @@ -95425,13 +95424,14 @@ location.href = '#foo';</code></pre>

<p>To <dfn>make document unsalvageable</dfn>, given a <code>Document</code> <var>document</var>
and a string <var>reason</var>:</p>
<ol>
<li><p><span data-x="set append">Append</span> <var>reason</var> to <var>document</var>'s
<span data-x="concept-document-bfcache-blocking-reasons">bfcache blocking reasons</span>.</p></li>

<li><p>Set <var>document</var>'s <i data-x="concept-document-salvageable">salvageable</i>
state to false.</p></li>
</ol>
<ol>
<li><p><span data-x="set append">Append</span> <var>reason</var> to <var>document</var>'s
<span data-x="concept-document-bfcache-blocking-reasons">bfcache blocking reasons</span>.</p></li>

<li><p>Set <var>document</var>'s <i data-x="concept-document-salvageable">salvageable</i>
state to false.</p></li>
</ol>

<p>To <dfn>build NotRestoredReasons object for document</dfn> given <code>Document</code>
<var>document</var>:</p>
Expand All @@ -95448,18 +95448,18 @@ location.href = '#foo';</code></pre>
<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>
<ol>
<li><p>Set <var>notRestoredReasonsForDocument</var>'s <span
data-x="dom-not-restored-reasons-src">src</span> to <var>document</var>'s
<li><p>Set the value of <var>notRestoredReasonsForDocument</var>'s <span
data-x="dom-not-restored-reasons-src">src</span> attribute to <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>

<li><p>Set <var>notRestoredReasonsForDocument</var>'s <span
data-x="dom-not-restored-reasons-id">id</span> to <var>document</var>'s
<li><p>Set the value of <var>notRestoredReasonsForDocument</var>'s <span
data-x="dom-not-restored-reasons-id">id</span> attribute to <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>

<li><p>Set <var>notRestoredReasonsForDocument</var>'s <span
data-x="dom-not-restored-reasons-name">name</span> to <var>document</var>'s
<li><p>Set the value of <var>notRestoredReasonsForDocument</var>'s <span
data-x="dom-not-restored-reasons-name">name</span> attribute to <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>
</ol>
Expand All @@ -95477,10 +95477,10 @@ location.href = '#foo';</code></pre>
<li><p>If <var>document</var>'s <span
data-x="concept-document-bfcache-blocking-reasons">bfcache blocking reasons</span> are empty, set
<var>notRestoredReasonsForDocument</var>'s <span
data-x="dom-not-restored-reasons-prevented-back-forward-cache">prevented bfcache state</span>
data-x="concept-not-restored-reasons-prevented-bfcache-state">prevented bfcache state</span>
to "<code data-x="dom-PreventedBackForwardCache-no">no</code>". If not, set
<var>notRestoredReasonsForDocument</var>'s <span
data-x="dom-not-restored-reasons-prevented-back-forward-cache">preventedBackForwardCache</span>
data-x="concept-not-restored-reasons-prevented-bfcache-state">prevented bfcache state</span>
to "<code data-x="dom-PreventedBackForwardCache-yes">yes</code>".</p></li>

<li><p><span data-x="list iterate">For each</span> <var>navigable</var> of <var>document</var>'s
Expand Down Expand Up @@ -95510,36 +95510,37 @@ location.href = '#foo';</code></pre>
</ol>

<p>To <dfn>build NotRestoredReasons object for a top-level traversal and its descendants</dfn>
given <code>document state</code> <var>documentState</var>:
given <span>navigable</span> <var>navigable</var>:
<ol>
<li><p><span>Build NotRestoredReasons object for document</span> given <var>documentState</var>'s
<span data-x="document-state-document">document</span>.</p></li>
<li><p><span>Build NotRestoredReasons object for document</span> given <var>navigable</var>'s
<span data-x="nav-document">active document</span>.</p></li>

<li><p>Let <var>crossOriginDescendants</var> be an empty <span>list</span>.</p></li>

<li><p><span data-x="list iterate">For each</span> <var>navigable</var> of
<var>documentState</var>'s <span data-x="document-state-document">document</span>'s
<li><p><span data-x="list iterate">For each</span> <var>childNavigable</var> of
<var>navigable</var>'s <span data-x="nav-document">active document</span>'s
<span>descendant navigables</span>:</p>
<ol>
<li><p>If <var>navigable</var>'s <span data-x="nav-document">active document</span>'s
<li><p>If <var>childNavigable</var>'s <span data-x="nav-document">active document</span>'s
<span data-x="concept-document-origin">origin</span> is not <span>same origin</span> with
<var>documentState</var>'s <span data-x="document-state-document">document</span>, then <span
data-x="list append">append</span> <var>navigable</var> to
<var>navigable</var>'s <span data-x="nav-document">active document</span>, then <span
data-x="list append">append</span> <var>childNavigable</var> to
<var>crossOriginDescendants</var>.</p></li>
</ol>
</li>

<li><p>Set <var>crossOriginCount</var> be <var>crossOriginDescendants</var>'s <span
<li><p>Let <var>crossOriginCount</var> be <var>crossOriginDescendants</var>'s <span
data-x="list size">size</span>.</p></li>

<li><p>Let <var>randomIndex</var> be a randomly selected integer from 0 to
<var>crossOriginCount</var> &minus; 1.</p></li>

<li><p>Let <var>index</var> be 0.</p></li>

<li><p><span data-x="list iterate">For each</span> <var>crossOriginDescendants</var>:</p>
<li><p><span data-x="list iterate">For each</span> <var>crossOriginNavigable</var> of
<var>crossOriginDescendants</var>:</p>
<ol>
<li><p>Let <var>reasonsForCrossOriginChild</var> be <var>navigable</var>'s <span
<li><p>Let <var>reasonsForCrossOriginChild</var> be <var>crossOriginNavigable</var>'s <span
data-x="nav-document">active document</span>'s <span>document state</span>'s <span
data-x="document-state-not-restored-reasons">notRestoredReasons</span>.</p></li>

Expand Down Expand Up @@ -96665,9 +96666,7 @@ new PaymentRequest(&hellip;); // Allowed to use

<li><p>If <var>oldDocument</var>'s <span>node navigable</span> is a <span>top-level
traversable</span>, <span>build NotRestoredReasons object for a top-level traversal and its
descendants</span> given <var>oldDocument</var>'s <span>node navigable</span>'s <span
data-x="nav-active-history-entry">active session history entry</span>'s <span
data-x="she-document-state">document state</span>.</p></li>
descendants</span> given <var>oldDocument</var>'s <span>node navigable</span>.</p></li>

<li><p>If <var>oldDocument</var>'s <i data-x="concept-document-salvageable">salvageable</i> state
is false, then <span data-x="destroy a document">destroy</span> <var>oldDocument</var>.</p></li>
Expand All @@ -96694,7 +96693,7 @@ new PaymentRequest(&hellip;); // Allowed to use
object</span> is <var>window</var>, <span>make disappear</span> <var>webSocket</var>.</p>

<p>If this affected any <code>WebSocket</code> objects, then <span>make document
unsalvageable</span> given <var>document</var> and a string "<code
unsalvageable</span> given <var>document</var> and "<code
data-x="blocking-websocket">websocket</code>".</p>

</li>
Expand Down Expand Up @@ -96795,7 +96794,7 @@ new PaymentRequest(&hellip;); // Allowed to use
the network for them. If this resulted in any instances of the <span
data-x="concept-fetch">fetch</span> algorithm being canceled or any <span data-x="queue a
task">queued</span> <span data-x="concept-task">tasks</span> or any network data getting
discarded, then <span>make document unsalvageable</span> given <var>document</var> and a string
discarded, then <span>make document unsalvageable</span> given <var>document</var> and
"<code data-x="blocking-fetch-canceled">fetch-canceled</code>".</p></li>

<li>
Expand Down Expand Up @@ -96824,7 +96823,7 @@ new PaymentRequest(&hellip;); // Allowed to use

<li><p><span data-x="abort a parser">Abort that parser</span>.</p></li>

<li><p><span>Make document unsalvageable</span> given <var>document</var> and a string
<li><p><span>Make document unsalvageable</span> given <var>document</var> and
"<code data-x="blocking-parser-aborted">parser-aborted</code>".</p></li>
</ol>
</li>
Expand Down

0 comments on commit 04780a9

Please sign in to comment.