When @Host rule is used not in shadow root then CSSRule object returned by cssRules property, not CSSHostRule Chrome 25.0.1364.0 canary. Test: <html> <head> <script type="text/javascript"> function test() { var d = document; var host = d.createElement('div'); d.body.appendChild(host); var style = d.createElement('style'); style.innerHTML = '' + 'span { color: blue; }' + '@host {' + 'div { color: red; }' + '}'; d.head.appendChild(style); alert('Expected 1001, actual ' + d.styleSheets[0].cssRules[1].type); } </script> </head> <body onload="test()"> </body> </html>
Specification https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#css-host-rule-interface
Hello, Since CSSHostRule has not been implemented yet, currently CSSUnknownRule is used instead. I'm now trying to fix this issue on bug 102344. Best regards, Takashi Sakamoto *** This bug has been marked as a duplicate of bug 102344 ***