Contact emailsmas...@chromium.org

Explainer
https://developers.google.com/web/updates/2019/02/constructable-stylesheets

Specification
https://www.w3.org/TR/cssom-1/#extensions-to-the-document-or-shadow-root-interface

Summary

The prior specification for adoptedStyleSheets used a FrozenArray backing
array. The spec was recently changed, so that the backing array is an
ObservableArray. This makes the API easier to use and understand, since it
is a true mutable JS array object. For example, normal array operations
such as adoptedStyleSheets.push(sheet) can be used.


Blink componentBlink
<https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink>

Search tagsadoptedStyleSheets
<https://chromestatus.com/features#tags:adoptedStyleSheets>, ObservableArray
<https://chromestatus.com/features#tags:ObservableArray>

TAG review

TAG review statusNot applicable

Risks


Interoperability and Compatibility

Chromium is the only shipped implementation of adoptedStyleSheets. Gecko
would like to ship this feature, but has been waiting for the resolution of
this issue (FrozenArray vs. ObservableArray) to ship their implementation.
This should unblock Gecko [1]. The Edge team supports this change [2].
WebKit continues to be skeptical [3] of this usefulness of this feature,
despite the general agreement of the rest of the web components community
[4], and the support of the developer community [5][6][7]. So the interop
risk is mainly that WebKit decides not to implement this feature. Compat
risks (from the change from FrozenArray to ObservableArray) should be
minimal, as the same re-assignment semantics will continue to work. As
documentation improves, and usage expands, we expect re-assignment usage to
wane, and mutation (e.g. adoptedStyleSheets.push()) to expand. [1]
https://github.com/WICG/construct-stylesheets/issues/45#issuecomment-834749590
[2] https://github.com/whatwg/webidl/issues/1027#issuecomment-940204556 [3]
https://github.com/WICG/construct-stylesheets/issues/45#issuecomment-826036758
[4]
https://github.com/WICG/construct-stylesheets/issues/45#issuecomment-825055766
[5]
https://github.com/WICG/construct-stylesheets/issues/45#issuecomment-577941622
[6]
https://github.com/WICG/construct-stylesheets/issues/45#issuecomment-827229881
[7]
https://github.com/WICG/construct-stylesheets/issues/45#issuecomment-827234689


Gecko: Positive (
https://github.com/whatwg/webidl/issues/1027#issuecomment-940204556)

WebKit: Negative (
https://github.com/WICG/construct-stylesheets/issues/45#issuecomment-826036758
)

Web developers: Strongly positive Several large web component developers
are strongly positive on this feature and change. See several links in the
"Interoperability and Compatibility Risks" section.

Other signals:


Debuggability

This feature should remain debuggable via existing JS/devtools
infrastructure. There is good support for adoptedStyleSheets already in
devtools.


Is this feature fully tested by web-platform-tests
<https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>
?Yes

Flag nameBecause few compat risks are anticipated, and because it is
relatively difficult to switch the representation (FrozenArray to
ObservableArray) via a feature flag, this feature will be enabled by
default. This will be done at the start of a new Chromium milestone (M99),
and bugs will be monitored carefully in case any breakages are observed.

Requires code in //chrome?False

Tracking bughttps://crbug.com/1236777

Estimated milestones

No milestones specified


Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5638996492288000

This intent message was generated by Chrome Platform Status
<https://www.chromestatus.com/>.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAM%3DNeDijQpNhJJJUjtCzLSDrPngTHYY31H4oJrULxm%3DtxLVHew%40mail.gmail.com.

Reply via email to