-
Notifications
You must be signed in to change notification settings - Fork 717
[css-view-transitions] Make CSSOM interface read-only #10011
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
Comments
This is the resolution for making OM interfaces read-only: #7850 |
This seem to be about nested media-queries... am I missing something? |
It would be a (minor) shame to make them readonly. e.g. |
I'm ok with making this read only given the recent resolution to add mutable types to the VT object: https://drafts.csswg.org/css-view-transitions-2/#dom-viewtransition-typelist. The recommended pattern if authors need to set type per navigation would be to use this in |
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> emilio: We generally had resolved to make a buch of new CSSOM interfaces read-only<fantasai> emilio: ViewTransition had a weird DomTokenList thing <fantasai> emilio: I think we resolved to do dynaic changes in a different way? If so I would prefer if it was read-only. <vmpstr> q+ <iank_> q- <ntim> q+ <astearns> ack vmpstr <fantasai> vmpstr: We've made the types mutable via ViewTransition object <khush_> +1 <fantasai> vmpstr: so I don't think we need to make the interface writeable, so support change to readonly <bramus> +1 <fantasai> astearns: Other comments/concerns with making readonly? <fantasai> ntim: Does this affect anything in View Transitions L1 <fantasai> ntim: curious if it affects existing implementations <fantasai> ?: This is for opt-in for cross-document transitions, so L2 only <fantasai> ntim: ok <fantasai> emilio: what interface does the CSS rule implement in L1? <fantasai> ?: It has an IDL retrieved via API call. There's no CSS at-rule. <vmpstr> s/?/vmpstr/ <fantasai> s/?/vmpstr/ <fantasai> emilio: Also DOMTokenList should probably be a FrozenArray or something <ntim> I removed the css-view-transitions-1 label from the issue :) <fantasai> PROPOSED: Make CSSViewTransitionRule readaonly <fantasai> s/aonly/only/ <fantasai> astearns: any objections? <fantasai> RESOLVED: Make CSSViewTransitionRule readonly <fantasai> astearns: Should we try resolution for changing DOMTokenList? <fantasai> fantasai: we can at least resolve that it needs to change <fantasai> PROPOSED: Change use of DOMTOkenList to something more appropriate for readonly interfaces <fantasai> RESOLVED: Change use of DOMTokenList to something more appropriate for readonly interfaces |
If I am not mistaken, csswg-drafts/css-view-transitions-2/Overview.bs Lines 423 to 424 in 6e7ae33
|
Yes, thanks for catching all these! |
@noamr it seems a |
I'm also OK with that, though there is precedent for those readonly setlikes, e.g. GPUSupportedFeatures, and it seems more "correct" in a way to represent this as a set. |
@noamr Is there any de-duplication going on during parsing or what not if you specify the same name twice? If not (and that is uncommon), it's more of an array than a set... |
Yea, it should appear as a unique-only set in CSSOM, there should be deduping when creating that set by the parser |
Reopening for setting the attribute to readonly |
See CSSWG resolution: w3c/csswg-drafts#10011 (comment) Bug: 330531066 Change-Id: Ica350ab517a96a9a9e25af78ef28a00ded30d2c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5395234 Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org> Reviewed-by: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1278548}
I think we have a resolution to make new OM interfaces read-only somewhere, but I couldn't find it. #6819 / #7033 (comment) etc are pointers tho...
In any case, any strong reason to make https://drafts.csswg.org/css-view-transitions-2/#navgation-behavior-rule-interface writeable? If not, could we just make it read-only?
cc @nt1m @noamr @tabatkins
The text was updated successfully, but these errors were encountered: