You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If failure is returned, then [=skip the view transition=] for |transition| with an "{{InvalidStateError}}" {{DOMException}} in |transition|'s [=relevant Realm=],
1320
1293
and return.
1321
1294
1295
+
1. [=Resolve=] |transition|'s [=ViewTransition/update callback done promise=] with undefined.
1296
+
1322
1297
1. [=list/For each=] |capturedElement| of |transition|'s [=ViewTransition/named elements=]'[=map/values=]:
1323
1298
1324
1299
1. If |capturedElement|'s [=captured element/new element=] is not null,
- If the promise was fulfilled, then return undefined.
1614
+
1. [=Resolve=] |transition|'s [=ViewTransition/update callback done promise=] with undefined.
1615
+
1616
+
Note: This would be a no-op if the previous step already resolved the promise.
1617
+
1618
+
1. Let |rejectSteps| be the following steps given |reason|:
1619
+
1. [=Reject=] |transition|'s [=ViewTransition/update callback done promise=] with |reason|.
1620
+
1621
+
1. If |transition|'s [=ViewTransition/phase=] is "`done`", then return.
1622
+
1623
+
Note: This happens if |transition| was [=skip the view transition|skipped=] before this point.
1624
+
1625
+
1. [=Mark as handled=] |transition|'s [=ViewTransition/ready promise=].
1626
+
1627
+
Note: |transition|'s [=ViewTransition/update callback done promise=] will provide the {{unhandledrejection}}.
1628
+
This step avoids a duplicate.
1629
+
1630
+
1. [=Skip the view transition=] |transition| with |reason|.
1631
+
1632
+
1. [=React=] to |callbackPromise| with |fulfillSteps| and |rejectSteps|.
1633
+
1634
+
1. To skip a transition after a timeout, the user agent may perform the following steps [=in parallel=]:
1635
+
1. Wait for an implementation-defined [=duration=].
1636
+
1637
+
1. [=Queue a global task=] on the [=DOM manipulation task source=],
1638
+
given |transition|'s [=relevant global object=], to perform the following steps:
1639
+
1640
+
1. If |transition|'s [=ViewTransition/phase=] is "`done`", then return.
1641
+
1642
+
Note: This happens if |transition| was [=skip the view transition|skipped=] before this point.
1643
+
1644
+
1. [=skip the view transition|Skip=] |transition| with a "{{TimeoutError}}" {{DOMException}}.
1640
1645
1641
-
Note: Since the rejection of |callbackPromise| isn't explicitly handled here,
1642
-
if |callbackPromise| rejects, then |transition|'s [=ViewTransition/update callback done promise=] will reject with the same reason.
1643
1646
</div>
1644
1647
1645
1648
## [=Skip the view transition=] ## {#skip-the-view-transition-algorithm}
@@ -1951,6 +1954,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
1951
1954
* `view-transition-name: auto` should be an invalid value. See <a href="https://github.com/w3c/csswg-drafts/issues/9639">issue 9639</a>.
1952
1955
* Add note to explain paint order for entry animations. See <a href="https://github.com/w3c/csswg-drafts/issues/9672">issue 9672</a>.
1953
1956
* Add note to explain how the named elements are cleaned up. See <a href="https://github.com/w3c/csswg-drafts/issues/9669">issue 9669</a>.
1957
+
* Refactor algorithm to clarify timing, especially of `updateCallbackDone. See <a href="https://github.com/w3c/csswg-drafts/issues/9762">issue 9762</a>.
1954
1958
1955
1959
<h3 id="changes-since-2022-05-25">
1956
1960
Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230525/">2022-05-25 Working Draft</a>
0 commit comments