[css-view-transitions-2] cross-document transition preceeds startViewTransition on outgoing page#9609
[css-view-transitions-2] cross-document transition preceeds startViewTransition on outgoing page#9609
Conversation
…Transition on outgoing page Closes w3c#9512
There was a problem hiding this comment.
Can you add the changes made here into the appendix as well "changes since " thing at the bottom
|
|
||
| 1. If |document|'s [=auto-skip view transitions=] is true, then: | ||
|
|
||
| 1. [=Queue a global task=] on the [=DOM manipulation task source=], |
| 1. If |document|'s [=auto-skip view transitions=] is true, then: | ||
|
|
||
| 1. [=Queue a global task=] on the [=DOM manipulation task source=], | ||
| given |transition|'s [=relevant global object=], |
There was a problem hiding this comment.
Should we be doing all this in a separate task or just the update callback dispatch? skip transition only makes running the callback async: https://drafts.csswg.org/css-view-transitions-1/#skip-the-view-transition.
|
|
||
| 1. [=Reject=] |transition|'s [=ViewTransition/ready promise=] with an "{{InvalidStateError}}" {{DOMException}}. | ||
|
|
||
| 1. [=Mark as handled=] |transition|'s [=ViewTransition/ready promise=]. |
There was a problem hiding this comment.
I thought this isn't needed, rejecting above will automatically mark it as handled?
|
|
||
| 1. [=Mark as handled=] |transition|'s [=ViewTransition/ready promise=]. | ||
|
|
||
| 1. [=Resolve=] |transition|'s [=ViewTransition/finished promise=]. |
There was a problem hiding this comment.
In the default case, we mirror the result of update callback promise into finished. IIRC the rationale was that developers use the finished promise to execute code that should run when the DOM update was successful.
I sent a PR to refactor a bit so we can use the skip the view transition algo instead of repeating a bunch of same stuff here: #9611
When starting a transition in an old page and there's a capture ongoing for a cross-document view transition, the programatically-created transition is automatically skipped, calling its callback and resolving the promises on the next task. The
readypromise is rejected.As per resolution.
Closes #9512