-
Notifications
You must be signed in to change notification settings - Fork 756
[css-view-transitions-2] Apply resolutions for view-transition types #10072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Make types mutable using ViewTransition.typeList w3c#9542 (comment) - Separate `:active-view-transition` and `:active-view-transition-type` See w3c#9972 (comment) - Add notes about types being bound to one document See w3c#9526 (comment) Closes w3c#9972 Closes w3c#9542 Closes w3c#9526 Closes w3c#9626
| }; | ||
| </pre> | ||
|
|
||
| The {{ViewTransition/typeList}} [=getter steps=] are to return [=this=]'s [=ViewTransition/active types=]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need setter steps for this to update active types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's a readonly DOMTokenList. It stays constant, and you can mutate its internal token set with the DOMTokenList API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... made it readonly, that was indeed missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. So the attribute is readonly but you can mutate the DOMTokenList.
css-view-transitions-2/Overview.bs
Outdated
| 1. Let |viewTransition| be the result of running the [=method steps=] for {{Document/startViewTransition(updateCallback)}} given |updateCallback|. | ||
|
|
||
| 1. If |callbackOptions| is a {{StartViewTransitionOptions}}, then set |viewTransition|'s [=ViewTransition/active types=] to |callbackOptions|'s {{StartViewTransitionOptions/type}}. | ||
| 1. If |callbackOptions| is a {{StartViewTransitionOptions}}, then [=list/extend=] |viewTransition|'s [=ViewTransition/active types=] with |callbackOptions|'s {{StartViewTransitionOptions/type}}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: At every instance active types is updated, its value is overwritten completely instead of appending. Can we say that instead of extend to make that obvious?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the proper way to copy a list into an existing set (the token set). How would you reword it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See revision, I'm setting it to the set from the rule when possible, but still using extend for adding the array from startViewTransition
Co-authored-by: Khushal Sagar <63884798+khushalsagar@users.noreply.github.com>
| }; | ||
| </pre> | ||
|
|
||
| The {{ViewTransition/typeList}} [=getter steps=] are to return [=this=]'s [=ViewTransition/active types=]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. So the attribute is readonly but you can mutate the DOMTokenList.
Make types mutable using ViewTransition.typeList [css-view-transitions-2] Allow changing
typesusing JS after (MPA) transition started? #9542 (comment)Separate
:active-view-transitionand:active-view-transition-typeSee [css-view-transitions-2] Rename:active-view-transition()pseudo-class #9972 (comment)Add notes about types being bound to one document See [css-view-transitions-2] Behavior of mismatching types between old and new document #9526 (comment)
Closes #9972
Closes #9542
Closes #9526
Closes #9626
[css-spec-shortname-1] Brief description which should also include the #issuenum-or-URL and/or link to relevant CSSWG minutes.
Copy the above line into the Title and replace with the relevant details. Fill in any additional details here. See https://github.com/w3c/csswg-drafts/blob/master/CONTRIBUTING.md for more info.