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

Add hasUAVisualTransition attribute to popState and navigate event #9579

Merged
merged 7 commits into from
Aug 17, 2023
Merged
Changes from 6 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
34 changes: 30 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
khushalsagar marked this conversation as resolved.
Show resolved Hide resolved
dispatching this event. If true, the best user experience will be given if the author
khushalsagar marked this conversation as resolved.
Show resolved Hide resolved
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
khushalsagar marked this conversation as resolved.
Show resolved Hide resolved
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>

khushalsagar marked this conversation as resolved.
Show resolved Hide resolved
<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">
khushalsagar marked this conversation as resolved.
Show resolved Hide resolved
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
khushalsagar marked this conversation as resolved.
Show resolved Hide resolved
<span data-x="doc-history">history object</span>'s <span
khushalsagar marked this conversation as resolved.
Show resolved Hide resolved
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