Skip to content

Commit 02fbadb

Browse files
committed
[css-view-transitions-2] Resolve finished promise at own task when animations are done
Closes w3c#12442
1 parent 44f9746 commit 02fbadb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

css-view-transitions-2/Overview.bs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3133,13 +3133,17 @@ To <dfn>adjust nested view transition group transform</dfn> given a |transform|
31333133

31343134
- |document|'s [=pending animation event queue=] has any events associated with |animation|.
31353135

3136-
1. If |hasActiveAnimations| is false:
3136+
1. If |hasActiveAnimations| is false and transition|'s [=ViewTransition/phase=] to "`animating`",
31373137

3138-
1. Set |transition|'s [=ViewTransition/phase=] to "`done`".
3138+
1. Set |transition|'s [=ViewTransition/phase=] to "`pending-done`".
31393139

3140-
1. [=Clear view transition=] |transition|.
3140+
1. [=Queue a global task=] on the [=DOM manipulation task source=],
3141+
given |transition|'s [=relevant global object=],
3142+
to perform the following step:
3143+
If |transition|'s [=ViewTransition/phase=] is "`pending-done`", then:
3144+
1. [=Resolve=] |transition|'s [=ViewTransition/finished promise=].
31413145

3142-
1. [=Resolve=] |transition|'s [=ViewTransition/finished promise=].
3146+
1. [=Clear view transition|clear=] |transition|.
31433147

31443148
1. Return.
31453149

0 commit comments

Comments
 (0)