Re: [w3c/webcomponents] ShadowRoot.styleSheets should return an empty StyleSheetList if the shadow root is not in a shadow-including document (#526)

Ops. I did not realize that we had a discussion. It looks I had actually closed the issue without thinking crefully. :(
Also I found this also: https://github.com/whatwg/html/issues/1194

It looks this is an intentional change.

However, I think we should revert this https://github.com/whatwg/html/pull/1199

The reason is :
I am afraid that most UAs can not return `StyleSheetList` for disconnected shadow trees because each item of the list should be `CSSStyleRule`, which has a property `rules`
which should be `CSSRuleList`. We can not return CSSRuleList because we have not parsed the contents of stylesheets yet. That's an important optimization. At least, Blink is not constructing `CSSRuleList` for style elements in disconnected trees.

I am not sure how other UAs are doing. But it would make sense to skip this process, I think.

If my understanding is wrong, please correct me.



---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/526#issuecomment-228652639

Received on Monday, 27 June 2016 04:40:24 UTC