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

Wrap "activate view transition" with script prepare/clean up #10284

Merged
merged 4 commits into from
Jul 12, 2024
Merged
Changes from 3 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
15 changes: 13 additions & 2 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -102972,8 +102972,19 @@ location.href = '#foo';</code></pre>
data-x="dom-PageRevealEvent-viewTransition">viewTransition</code> set to
<var>transition</var>.</p></li>

<li><p>If <var>transition</var> is not null, then <span
data-x="activate view transition">activate</span> <var>transition</var>.</p></li>
<li>
<p>If <var>transition</var> is not null, then:</p>

<ol>
<li><p><span>Prepare to run script</span> given <var>document</var>.</p></li>
noamr marked this conversation as resolved.
Show resolved Hide resolved
<li><p><span data-x="activate view transition">Activate</span> <var>transition</var>.</p></li>
<li><p><span>Clean up after running script</span> given <var>document</var>.</p></li>
domenic marked this conversation as resolved.
Show resolved Hide resolved
</ol>

<p class=note>Activating a view transition might resolve/reject promises, so by wrapping the
noamr marked this conversation as resolved.
Show resolved Hide resolved
activation with prepare/cleanup we ensure those promises are handled before the next rendering
step.</p>
</li>
</ol>

<p class="note">Though <code data-x="event-pagereveal">pagereveal</code> is guaranteed to be fired
Expand Down
Loading