Skip to content

Commit f62c438

Browse files
authored
[css-view-transitions-1] Fix timing of resolving the "update callback done" promise (w3c#10302)
The "update callback done" promise should always be resolved right after the update callback is called, even in failure cases. This is what certain WPTs expect, for instance: css/css-view-transitions/duplicate-tag-rejects-start.html
1 parent e100ca5 commit f62c438

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,8 +1280,6 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
12801280
If failure is returned, then [=skip the view transition=] for |transition| with an "{{InvalidStateError}}" {{DOMException}} in |transition|'s [=relevant Realm=],
12811281
and return.
12821282

1283-
1. [=Resolve=] |transition|'s [=ViewTransition/update callback done promise=] with undefined.
1284-
12851283
1. [=list/For each=] |capturedElement| of |transition|'s [=ViewTransition/named elements=]' [=map/values=]:
12861284

12871285
1. If |capturedElement|'s [=captured element/new element=] is not null,
@@ -1599,11 +1597,9 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
15991597
1. If |transition|'s [=ViewTransition/phase=] is not "`done`", then set |transition|'s [=ViewTransition/phase=] to "`update-callback-called`".
16001598

16011599
1. Let |fulfillSteps| be to following steps:
1602-
1. [=Activate view transition|Activate=] |transition|.
1603-
16041600
1. [=Resolve=] |transition|'s [=ViewTransition/update callback done promise=] with undefined.
16051601

1606-
Note: This would be a no-op if the previous step already resolved the promise.
1602+
1. [=Activate view transition|Activate=] |transition|.
16071603

16081604
1. Let |rejectSteps| be the following steps given |reason|:
16091605
1. [=Reject=] |transition|'s [=ViewTransition/update callback done promise=] with |reason|.

0 commit comments

Comments
 (0)