Skip to content

Commit 744ea62

Browse files
authored
added-active-view-transition (#12635)
1 parent 7dc15ff commit 744ea62

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

css-view-transitions-2/Overview.bs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ This will activate any of the following selectors:
506506
:root:active-view-transition {}
507507
```
508508

509-
While starting a transition without providing transition types, would only activate ':active-view-transition'':
509+
While starting a transition without providing transition types, would only activate '':active-view-transition'':
510510

511511
```js
512512
document.startViewTransition(updateTheDOMSomehow);
@@ -755,6 +755,21 @@ div.box {
755755
1. Return |viewTransition|.
756756
</div>
757757

758+
## Exposing current transition: `activeViewTransition` ## {#active-view-transition}
759+
760+
In order to provide ergonomic behavior, [=active view transition=] is exposed to script via a document property.
761+
762+
<dl dfn-for=document>
763+
: <dfn>activeViewTransition</dfn>
764+
:: a {{ViewTransition}} object, or null,
765+
that represents [=active view transition=].
766+
</dl>
767+
768+
Note: [=activeViewTransition=] mirrors [=active view transition=] in that whenever the latter exists
769+
(there is an ongoing transition), then [=activeViewTransition=] is not null and refers to this object
770+
771+
ISSUE: When merging css-view-transitions-1 into this, we can rename [=active view transition=] to [=activeViewTransition=]
772+
758773
# Determining 'view-transition-name' automatically # {#auto-vt-name}
759774

760775
## Overview ## {#auto-vt-name-overview}
@@ -1340,7 +1355,7 @@ this still presents two potential threats:
13401355

13411356
1. The [=environment settings object/cross-origin isolated capability=] in both documents might be different.
13421357
This can cause a situation where a {{Document}} that is [=environment settings object/cross-origin isolated capability|cross-origin isolated=]
1343-
can read image data from a document that is not cross-origin isolated. This is already mitigated in [[css-view-transitions-1#sec],
1358+
can read image data from a document that is not cross-origin isolated. This is already mitigated in [[css-view-transitions-1#sec]],
13441359
as the same restriction applies for captured cross-origin iframes.
13451360

13461361
1. A same-origin navigation might still occur via a cross-origin redirect, e.g. <code>https://example.com</code>
@@ -1383,3 +1398,4 @@ Changes from <a href="https://www.w3.org/TR/2024/WD-css-view-transitions-2-20240
13831398
* Initial spec for nested view transitions (<a href="https://github.com/w3c/csswg-drafts/issues/10334">#10334</a>)
13841399
* `view-transition-class` is a tree-scoped name (<a href="https://github.com/w3c/csswg-drafts/issues/10529">#10529</a>)
13851400
* Stop extending CSSRule with obsolete pattern (See <a href="https://github.com/w3c/csswg-drafts/issues/10606">#10606</a>)
1401+
* Added [=activeViewTransition=] definition (<a href="https://github.com/w3c/csswg-drafts/issues/12407">#12407</a>)

0 commit comments

Comments
 (0)