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
[css-view-transition-2] Clarify timeout behavior for inbound view transition
The previous wording of this was somewhat handwavy, made it more rigorous.
- The timeout starts when the transition is created (before pageswap)
- If the timeout expires before the transition is resolved (pagereveal), the
inbound transition params are cleared and the behavior is similar to having
the transition skipped at pageswap.
- If the timeout expires while the navigation is active, it is skipped with a
`TimeoutError`.
Closes#10800
## Additions to the view transition page-visibility change steps ## {#page-visibility-change-steps-additions}
@@ -992,6 +995,15 @@ The [=captured element=] struct should contain these fields, in addition to the
992
995
993
996
Note: The inbound transition is activated after the dispatch of {{Window/pagereveal}} to ensure mutations made in this event apply to the captured new state.
994
997
998
+
1.At any given time, the UA may decide to skip the inbound transition, e.g. after an [=implementation-defined=] timeout. To do so, the UA should [=queue a global task=] on the [=DOM manipulation task source=] given |newDocument|'s [=relevant global object=] to perform the following steps:
999
+
1000
+
1. If |newDocument|'s [=inbound view transition params=] is |params|, then set |newDocument|'s [=inbound view transition params=] to null.
1001
+
1002
+
1. If |newDocument|'s [=active view transition=] is |params|'s [=view transition params/resolved transition=], and |newDocument|'s [=active view transition=]'s [=ViewTransition/phase=] is not "`done`",
1003
+
then [=skip the view transition|skip=] |newDocument|'s [=active view transition=] with a "{{TimeoutError}}" {{DOMException}}.
1004
+
1005
+
Note: This allows user agents to
1006
+
995
1007
1. Call |proceedWithNavigation|.
996
1008
997
1009
1. Set |oldDocument|'s [=active view transition=] to |outboundTransition|.
@@ -1087,9 +1099,9 @@ Prepend the following step to the [=Perform pending transition operations=] algo
1087
1099
1088
1100
1. Set |transition|'s [=ViewTransition/active types=] to |resolvedRule|.
1089
1101
1090
-
1. At any given time, the UA may decide to skip the inbound transition, e.g. after an [=implementation-defined=] timeout.
1091
-
To do so, the UA should [=queue a global task=] on the [=DOM manipulation task source=] given |document|'s [=relevant global object=] to perform the following step:
1092
-
If |transition|'s [=ViewTransition/phase=] is not "`done`", then [=skip the view transition=]|transition| with a "{{TimeoutError}}" {{DOMException}}.
1102
+
1. Set |inboundViewTransitionParams|'s [=view transition params/resolved transition=] to |transition|.
1103
+
1104
+
Note: this allows skipping the transition after an [=implementation-defined=]timeout.
0 commit comments