The styleSheets
read-only property of the ShadowRoot
interface returns a StyleSheetList
of CSSStyleSheet
objects, for stylesheets explicitly linked into or embedded in a shadow tree.
The styleSheets
read-only property of the ShadowRoot
interface returns a StyleSheetList
of CSSStyleSheet
objects, for stylesheets explicitly linked into or embedded in a shadow tree.
A StyleSheetList
of CSSStyleSheet
objects.
js
let customElem = document.querySelector("my-shadow-dom-element"); let shadow = customElem.shadowRoot; let styleSheets = shadow.styleSheets;
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
styleSheets |
53 | 79 | 63 | No | 40 | 12.1 | 53 | 53 | 63 | 41 | 12.2 | 6.0 |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/styleSheets