Skip to content

Commit f15dd4c

Browse files
authored
[css-view-transitions-2] Editorial: fix document variable usage (#9861)
`document` is used without being declared - it's ambiguous as the surrounding steps have `oldDocument` and `newDocument`. Update to use the (hopefully) correct one.
1 parent ac7c594 commit f15dd4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

css-view-transitions-2/Overview.bs

+3-3
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
460460
Note: this means that any running transition would be skipped when the document is ready
461461
to unload.
462462

463-
1. Set |document|'s [=auto-skip view transitions=] to true.
463+
1. Set |oldDocument|'s [=auto-skip view transitions=] to true.
464464

465465
Note: this means that calling {{Document/startViewTransition()}} while capturing the old document for a cross-document view-transition would run the callback but skip the animation.
466466

@@ -478,7 +478,7 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
478478
Note: The ViewTransition object on the old Document should be destroyed after its state has been copied to the new Document below.
479479
We explicitly clear it here since the old Document may be cached by the UA.
480480

481-
1. Set |document|'s [=auto-skip view transitions=] to false.
481+
1. Set |oldDocument|'s [=auto-skip view transitions=] to false.
482482

483483
1. [=Queue a global task=] on the [=DOM manipulation task source=] given |newDocument|'s [=relevant global object=],
484484
to perform the following steps:
@@ -499,7 +499,7 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
499499
Note: The |inboundTransition| is activated after the dispatch of {{Window/pagereveal}} to ensure mutations made in this event apply to the captured new state.
500500

501501
1. At any given time, the UA may decide to skip |inboundTransition|, e.g. after an [=implementation-defined=] timeout.
502-
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:
502+
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 step:
503503
If |transition|'s [=ViewTransition/phase=] is not "`done`", then [=skip the view transition=] |transition| with a "{{TimeoutError}}" {{DOMException}}.
504504

505505
Note: |outboundTransition| is not exposed to JavaScript, it is used only for capturing

0 commit comments

Comments
 (0)