Re: [csswg-drafts] [css-view-transitions-2] Data type for types in script APIs (#10114)

> > We should decide if this set can hold and reflect invalid values (non-idents, none, -ua-*). Proposing that it's more useful if it can't reflect invalid values.
> 
> +1 to the set not holding invalid values. We can drop those as a part of the setter algorithm.
> 
> > For CSSViewTransitionRule.types, I think we should have a readonly setlike, like [GPUSupportedFeatures](https://gpuweb.github.io/gpuweb/#gpusupportedfeatures).
> 
> SGTM
> 
> Any suggestion for this: "startViewTransition has a types param which is currently sequence"? There was also a question about potentially dropping this altogether now that mutable types is a trivial way to do the same thing.

I'd say either dropping it or keeping it as a sequence is fine.

To clarify, what I propose as a resolution:
- use `ViewTransitionTypeSet` for `ViewTransition.types` (a `setlike` interface). This throws a type error when trying to add `none`, something that begins with `-ua`-, or anything that's not a valid `custom-ident`
- use `CSSViewTransitionTypeSet` for `CSSViewTransitionRule.types` (a readonly `setlike` interface)
- Optionally, remove the `startViewTransition(callbackOptions)` variant.

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


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

Received on Monday, 25 March 2024 09:49:44 UTC