Skip to content

Commit fbb66f7

Browse files
authored
[css-view-transitions-1] Auto-skip a view-transition if document is hidden (#9942)
See [resolution](#9543 (comment)).
1 parent 5fc1aee commit fbb66f7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

css-view-transitions-1/Overview.bs

+6-2
Original file line numberDiff line numberDiff line change
@@ -956,8 +956,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
956956

957957
1. Let |document| be [=this's=] [=relevant global object's=] [=associated document=].
958958

959+
1. If |document|'s [=Document/visibility state=] is "<code>hidden</code>",
960+
then [=skip the view transition|skip=] |transition| with an "{{InvalidStateError}}" {{DOMException}},
961+
and return.
962+
959963
1. If |document|'s [=auto-skip view transitions=] is true,
960-
then [=skip the view transition=] for |transition| with "{{InvalidStateError}}" {{DOMException}},
964+
then [=skip the view transition|skip=] |transition| with an "{{InvalidStateError}}" {{DOMException}},
961965
and return.
962966

963967
1. If |document|'s [=active view transition=] is not null,
@@ -1955,7 +1959,7 @@ Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230
19551959
* 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>.
19561960
* Refactor algorithm to clarify timing, especially of `updateCallbackDone. See <a href="https://github.com/w3c/csswg-drafts/issues/9762">issue 9762</a>.
19571961
* Add animation-delay inherit to UA stylesheet rules for (::view-transition) -image-pair, -old, and -new. See <a href="https://github.com/w3c/csswg-drafts/issues/9817">issue 9817</a>.
1958-
1962+
* Auto-skip animation when document is hidden. See <a href="https://github.com/w3c/csswg-drafts/issues/9543">issue 9543</a>.
19591963
<h3 id="changes-since-2022-05-25">
19601964
Changes from <a href="https://www.w3.org/TR/2023/WD-css-view-transitions-1-20230525/">2022-05-25 Working Draft</a>
19611965
</h3>

0 commit comments

Comments
 (0)