Skip to content

Commit

Permalink
[css-view-transition-2] Clarify timeout behavior for inbound view tra…
Browse files Browse the repository at this point in the history
…nsition (#10817)
  • Loading branch information
noamr committed Sep 19, 2024
1 parent 5ebf7df commit c6b1b11
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions css-view-transitions-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,14 @@ The [=captured element=] struct should contain these fields, in addition to the

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.

1. To skip the transition after a timeout, the user agent may perform the following steps [=in parallel=]:

1. Wait for an [=implementation-defined=] [=duration=].

1. [=Queue a global task=] on the [=DOM manipulation task source=] given |newDocument|'s [=relevant global object=] to perform the following step:

1. If |newDocument|'s [=inbound view transition params=] is |params|, then set |newDocument|'s [=inbound view transition params=] to null.

1. Call |proceedWithNavigation|.

1. Set |oldDocument|'s [=active view transition=] to |outboundTransition|.
Expand Down Expand Up @@ -1087,9 +1095,6 @@ Prepend the following step to the [=Perform pending transition operations=] algo

1. Set |transition|'s [=ViewTransition/active types=] to |resolvedRule|.

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 |document|'s [=relevant global object=] to perform the following step:
If |transition|'s [=ViewTransition/phase=] is not "`done`", then [=skip the view transition=] |transition| with a "{{TimeoutError}}" {{DOMException}}.

1. Return |transition|.
</div>
Expand Down

0 comments on commit c6b1b11

Please sign in to comment.