You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once it's easier to construct (or import, see WICG/webcomponents#759), they're more likely to be passed around to disparate parts of an application, which might try to independently mutate the stylesheet (say, to implement scoping via rewriting selectors).
Making it easy to clone a StyleSheet could help in code that wants to share/reuse StyleSheets safely. Clones could possibly be cheap if they allow for copy-on-write optimizations.
The text was updated successfully, but these errors were encountered:
Yeah, I guess it makes sense. I was not sure how many parts of the source CSSStyleSheet should be kept (will it be just like making a CSSStyleSheetInit and text out of the source CSSStyleSheet and constructing with that, or are we keeping more), but looking again it seems there's only ownerNode and parentStyleSheet left (which should both be null, probably) so everything seems fine.
Once it's easier to construct (or import, see WICG/webcomponents#759), they're more likely to be passed around to disparate parts of an application, which might try to independently mutate the stylesheet (say, to implement scoping via rewriting selectors).
Making it easy to clone a StyleSheet could help in code that wants to share/reuse StyleSheets safely. Clones could possibly be cheap if they allow for copy-on-write optimizations.
The text was updated successfully, but these errors were encountered: