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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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 a callback</span> given <var>document</var>.</p></li>
Copy link
Member

Choose a reason for hiding this comment

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

Newlines between <li>s, like elsewhere in the document

<li><p><span data-x="activate view transition">Activate</span> <var>transition</var>.</p></li>
<li><p><span>Clean up after running a callback</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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<p class=note>Activating a view transition might resolve/reject promises, so by wrapping the
<p class="note">Activating a view transition might resolve/reject promises, so by wrapping the

like elsewhere

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