- From: Anne van Kesteren <notifications@github.com>
- Date: Fri, 22 Jul 2016 01:21:07 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Friday, 22 July 2016 08:22:00 UTC
So it's rather messy actually. While `<style>.sheet` returns a stylesheet, `document.styleSheets` only returns the one from `<style>` in Firefox. Both Chrome and Safari have `document.styleSheets` empty, despite `<style>.sheet` returning a stylesheet.
No browser appears to load `@import` or cause that to create another stylesheet.
I used variations on this code in Live DOM Viewer:
```
<!DOCTYPE html>
<script>
var d = document.implementation.createHTMLDocument();
var s = d.createElement('style');
s.textContent = '@import "style"';
d.documentElement.childNodes[0].appendChild(s);
w(s.sheet);
w(s.sheet.cssRules[0].cssText);
setTimeout("w(d.styleSheets.length)", 500)
</script>
```
---
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/56#issuecomment-234483300
Received on Friday, 22 July 2016 08:22:00 UTC