Skip to content

Commit

Permalink
[css-view-transitions-2] UA may apply implementation-defined timeout …
Browse files Browse the repository at this point in the history
…o cross-document view transition (#9608)

* [css-view-transitions-2] UA may apply implementation-defined timeout to cross-document view transition
Closes #9155

* Reword timeout
  • Loading branch information
noamr committed Nov 17, 2023
1 parent 9ac9b46 commit eaf7fdd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions css-view-transitions-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -517,17 +517,23 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
We explicitly clear it here since the old Document may be cached by the UA.

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

1. Let |newDocument|'s [=active view transition=] be a new {{ViewTransition}} in |newDocument|'s [=relevant Realm=],
1. Let |inboundTransition| be a new {{ViewTransition}} in |newDocument|'s [=relevant Realm=],
whose [=ViewTransition/named elements=] is |outboundTransition|'s [=ViewTransition/named elements=],
[=ViewTransition/initial snapshot containing block size=] is |outboundTransition|'s [=ViewTransition/initial snapshot containing block size=],
and whose [=ViewTransition/is inbound cross-document transition=] is true.

1. [=Call the update callback=] for |newDocument|'s [=active view transition=].
1. Let |newDocument|'s [=active view transition=] be |inboundTransition|.

1. [=Call the update callback=] for |inboundTransition|.

1. Call |onReady|.

1. At any given time, the UA may decide to skip |inboundTransition|, 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}}.

Note: |outboundTransition| is not exposed to JavaScript, it is used only for capturing
the state of the old document.

Expand Down

0 comments on commit eaf7fdd

Please sign in to comment.