Skip to content

Commit f6a3700

Browse files
committed
[css-view-transitions-1] Flush the callback queue before performing other view-transition operations
This ensures that a DOM update callback that skips the active transition would take effect. Closes w3c#11943
1 parent fcf496c commit f6a3700

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,10 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
12351235

12361236
To <dfn>perform pending transition operations</dfn> given a {{Document}} |document|, perform the following steps:
12371237

1238+
1. [=Flush the update callback queue=].
1239+
1240+
Note: this ensures that any changes to the DOM scheduled by other skipped transitions are done before the old state for this transition is captured.
1241+
12381242
1. If |document|'s [=document/active view transition=] is not null, then:
12391243

12401244
1. If |document|'s [=document/active view transition=]'s [=ViewTransition/phase=] is "`pending-capture`",
@@ -1256,10 +1260,6 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
12561260

12571261
1. Let |document| be |transition|'s [=relevant global object's=] [=associated document=].
12581262

1259-
1. [=Flush the update callback queue=].
1260-
1261-
Note: this ensures that any changes to the DOM scheduled by other skipped transitions are done before the old state for this transition is captured.
1262-
12631263
1. [=Capture the old state=] for |transition|.
12641264

12651265
If failure is returned, then [=skip the view transition=] for |transition| with an "{{InvalidStateError}}" {{DOMException}} in |transition|'s [=relevant Realm=],

0 commit comments

Comments
 (0)