A bit delayed, missed sending this email, but let me know if there's any
concern with this, still on time to disable for 101 if needed :)
In bug 1644102 (targeting Firefox 101) I enabled Constructable
Stylesheets on all channels. This is an API that allows authors to
programmatically share stylesheets across ShadowRoot instances, instead
of relying on engine optimizations for example.
This should improve memory usage (unclear if performance, in practice)
of large web component libraries (by avoiding having large DOM text
nodes duplicated for each component in inline styles).
Specification:
https://drafts.csswg.org/cssom/#the-cssstylesheet-interface
Standards Body: W3C
Platform coverage: All
Preference: layout.css.constructable-stylesheets.enabled
DevTools bug: bug 1602535, bug 1769933
Other browsers:
The history of this feature is kind of turbulent. Chrome shipped way too
early, IMO, without accounting for various spec issues like
https://github.com/WICG/construct-stylesheets/issues/45.
Thanks to the work of a lot of people we could reach to an agreement and
update the spec to address such concerns by using ObservableArray. I
believe this is now in good shape to ship, but let me know if there are
any concerns.
* Chromium: Shipped
* Safari: Not Yet Implemented
(
https://bugs.webkit.org/show_bug.cgi?id=228684)
Thanks to Erik Nordin for all the initial work on the feature, to Edgar
Chen and Peter Van der Beken for implementing ObservableArray support
and their reviews, and to Nicolas Chevobbe for all the DevTools review.
Cheers,
-- Emilio