Re: [csswg-drafts] [css-view-transitions-2] Behavior of mismatching types between old and new document (#9526)

> If distinguishing new/old is the main use case, could we do that in a simpler way by having the UA automatically apply these types? e.g. outgoing view always adds `-ua-old` and incoming gets `-ua-new`

FWIW, I'm in favor of this. If UA controls when `-ua-old` and `-ua-new` are added, then the complexity of whether it's added at the right spot is an implementation detail. 

I also fully realize that the complexities we're talking about here are not complexities of mutable types, but of the VT model and that's already exposed via regular DOM classes mutations: replace all mentions of "change the type" to "change the class" and you have exactly the same arguments. Obviously we allow class mutations though.

Lastly, I just want to say my push back here is only for SPA. For MPA, I support some notion of changing types _at the `pagereveal` event_. This adds the flexibility for the script to select an option in this issue: opt 1 by default, but feel free to combine it with `oldTypes` to get option 2, etc. Having types exposed on the VT object is one such approach. We can also expose types on the event itself, or have some other method. But again, this is "configure the vt" state in my mind.

Even for SPA though, I'd like to reiterate that I'm ok with the proposed solution (mutable types) in lieu of other solutions. 

-- 
GitHub Notification of comment by vmpstr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9526#issuecomment-1813194504 using your GitHub account


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

Received on Wednesday, 15 November 2023 20:12:41 UTC