You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This would mean that the reveal event would have a viewTransition object even if the document didn't opt-in, and would automatically skip the transition when it's read I find that a bit counter-intuitive.
Since you can already skip the transition in the reveal event, perhaps #9542 would be a more direct way to customize VT types on the go rather than modify opt-in rules in CSSOM?
Since you can already skip the transition in the reveal event, perhaps #9542 would be a more direct way to customize VT types on the go rather than modify opt-in rules in CSSOM?
+1. I came around to this myself. See comment here: #9526 (comment)
Seems like there is agreement on not changing this timing. The approach suggested in the first comment will require changing stylesheets via CSSOM anyway (which is awkward). So exploring something like #9542 is a better way to address this.
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 useviewTransition.abort()
if the fallback was to disable the transition. But since the opt-in now also includestype
, 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
The text was updated successfully, but these errors were encountered: