Skip to content

Commit

Permalink
Add hasUAVisualTransition to popState and navigate events
Browse files Browse the repository at this point in the history
Closes #8782.
  • Loading branch information
khushalsagar authored Aug 17, 2023
1 parent 0593c91 commit 1acea73
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -91612,6 +91612,7 @@ interface <dfn interface>NavigateEvent</dfn> : <span>Event</span> {
readonly attribute <code>FormData</code>? <span data-x="dom-NavigateEvent-formData">formData</span>;
readonly attribute DOMString? <span data-x="dom-NavigateEvent-downloadRequest">downloadRequest</span>;
readonly attribute any <span data-x="dom-NavigateEvent-info">info</span>;
readonly attribute boolean <span data-x="dom-NavigateEvent-hasUAVisualTransition">hasUAVisualTransition</span>;

undefined <span data-x="dom-NavigateEvent-intercept">intercept</span>(optional <span>NavigationInterceptOptions</span> options = {});
undefined <span data-x="dom-NavigateEvent-scroll">scroll</span>();
Expand Down Expand Up @@ -91736,6 +91737,11 @@ callback <dfn callback>NavigationInterceptHandler</dfn> = Promise&lt;undefined>
navigation, or undefined if the navigation was initiated by the user or by a different
API.</p></dd>

<dt><code data-x=""><var>event</var>.<span subdfn data-x="dom-NavigateEvent-hasUAVisualTransition">hasUAVisualTransition</span></code></dt>
<dd><p>Returns true if the user agent performed a visual transition for this navigation before
dispatching this event. If true, the best user experience will be given if the author
synchronously updates the DOM to the post-navigation state.</p></dd>

<dt><code data-x=""><var>event</var>.<span subdfn data-x="dom-NavigateEvent-intercept">intercept</span>({ <span subdfn data-x="dom-NavigationInterceptOptions-handler">handler</span>, <span subdfn data-x="dom-NavigationInterceptOptions-focusReset">focusReset</span>, <span subdfn data-x="dom-NavigationInterceptOptions-scroll">scroll</span> })</code></dt>
<dd>
<p>Intercepts this navigation, preventing its normal handling and instead converting it into a
Expand Down Expand Up @@ -91839,9 +91845,11 @@ callback <dfn callback>NavigationInterceptHandler</dfn> = Promise&lt;undefined>
for="NavigateEvent"><code data-x="dom-NavigateEvent-signal">signal</code></dfn>, <dfn attribute
for="NavigateEvent"><code data-x="dom-NavigateEvent-formData">formData</code></dfn>, <dfn
attribute for="NavigateEvent"><code
data-x="dom-NavigateEvent-downloadRequest">downloadRequest</code></dfn>, and <dfn attribute
for="NavigateEvent"><code data-x="dom-NavigateEvent-info">info</code></dfn> attributes must return
the values they are initialized to.</p>
data-x="dom-NavigateEvent-downloadRequest">downloadRequest</code></dfn>, <dfn attribute
for="NavigateEvent"><code data-x="dom-NavigateEvent-info">info</code></dfn>, and <dfn attribute
for="NavigateEvent"><code
data-x="dom-NavigateEvent-hasUAVisualTransition">hasUAVisualTransition</code></dfn> attributes
must return the values they are initialized to.</p>

<p>The <dfn method for="NavigateEvent"><code
data-x="dom-NavigateEvent-intercept">intercept(<var>options</var>)</code></dfn> method steps
Expand Down Expand Up @@ -92365,6 +92373,11 @@ interface <dfn interface>NavigationDestination</dfn> {
tracker</span>.</p>
</li>

<li><p>Initialize <var>event</var>'s <code
data-x="dom-NavigateEvent-hasUAVisualTransition">hasUAVisualTransition</code> to true if a visual
transition, to display a cached rendered state of the <var>document</var>'s <span>latest
entry</span>, was done by the user agent. Otherwise, initialize it to false.</p></li>

<li><p>Set <var>event</var>'s <span data-x="concept-NavigateEvent-abort-controller">abort
controller</span> to a <span>new</span> <code>AbortController</code> created in
<var>navigation</var>'s <span data-x="concept-relevant-realm">relevant realm</span>.</p></li>
Expand Down Expand Up @@ -92878,6 +92891,7 @@ interface <dfn interface>PopStateEvent</dfn> : <span>Event</span> {
constructor(DOMString type, optional <span>PopStateEventInit</span> eventInitDict = {});

readonly attribute any <span data-x="dom-PopStateEvent-state">state</span>;
readonly attribute boolean <span data-x="dom-PopStateEvent-hasUAVisualTransition">hasUAVisualTransition</span>;
};

dictionary <dfn dictionary>PopStateEventInit</dfn> : <span>EventInit</span> {
Expand All @@ -92890,6 +92904,12 @@ dictionary <dfn dictionary>PopStateEventInit</dfn> : <span>EventInit</span> {
<dd><p>Returns a copy of the information that was provided to <code
data-x="dom-history-pushState">pushState()</code> or <code
data-x="dom-history-replaceState">replaceState()</code>.</p></dd>

<dt><code data-x=""><var>event</var>.<span subdfn data-x="dom-PopStateEvent-hasUAVisualTransition">hasUAVisualTransition</span></code></dt>

<dd><p>Returns true if the user agent performed a visual transition for this navigation before
dispatching this event. If true, the best user experience will be given if the author
synchronously updates the DOM to the post-navigation state.</p></dd>
</dl>

<div w-nodev>
Expand All @@ -92899,6 +92919,9 @@ dictionary <dfn dictionary>PopStateEventInit</dfn> : <span>EventInit</span> {
initialized to. It represents the context information for the event, or null, if the state
represented is the initial state of the <code>Document</code>.</p>

<p>The <dfn attribute for="PopStateEvent"><code data-x="dom-PopStateEvent-hasUAVisualTransition">
hasUAVisualTransition</code></dfn> attribute must return the value it was initialized to.</p>

</div>


Expand Down Expand Up @@ -99588,7 +99611,10 @@ location.href = '#foo';</code></pre>
object</span>, using <code>PopStateEvent</code>, with the <code
data-x="dom-PopStateEvent-state">state</code> attribute initialized to <var>document</var>'s
<span data-x="doc-history">history object</span>'s <span
data-x="concept-history-state">state</span>.</p>
data-x="concept-history-state">state</span> and <code
data-x="dom-PopStateEvent-hasUAVisualTransition">hasUAVisualTransition</code> initialized to
true if a visual transition, to display a cached rendered state of the <span>latest
entry</span>, was done by the user agent.</p>

<li><p><span>Restore persisted state</span> given <var>entry</var>.</p></li>

Expand Down Expand Up @@ -139378,6 +139404,7 @@ INSERT INTERFACES HERE
Kevin Cole,
Kevin Gadd,
Kevin Venkiteswaran,
Khushal Sagar,
Kinuko Yasuda,
Koji Ishii,
Korn&eacute;l P&aacute;l,
Expand Down

0 comments on commit 1acea73

Please sign in to comment.