[csswg-drafts] [css-view-transitions-2] Timing of opt-in/type check on the new Document (#9595)

khushalsagar has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-view-transitions-2] Timing of opt-in/type check on the new Document ==
The spec currently resolves the opt-in on the new Document before dispatching the `reveal` event : https://drafts.csswg.org/css-view-transitions-2/#document-reveal.

This means authors can't use timing of the `reveal` event to customize the transition. For example, choosing between an element or fallback transition based on how much of the Document is parsed when the browser decides to paint. This was not an issue when the opt-in was limited to enabling/disabling the transition. The author could use `viewTransition.abort()` if the fallback was to disable the transition. But since the opt-in now also includes `type`, which is only read once on the new Document, authors won't be able to set the type to a fallback.

We should move when the opt-in is parsed to *after* dispatching the `reveal` event.

@noamr @bokand 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9595 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 13 November 2023 17:34:30 UTC