The styleSheets
read-only property of the Document
interface returns a StyleSheetList
of CSSStyleSheet
objects, for stylesheets explicitly linked into or embedded in a document.
The styleSheets
read-only property of the Document
interface returns a StyleSheetList
of CSSStyleSheet
objects, for stylesheets explicitly linked into or embedded in a document.
The returned list is ordered as follows:
Link
headers are placed first, sorted in header order.js
function getStyleSheet(unique_title) { for (const sheet of document.styleSheets) { if (sheet.title === unique_title) { return sheet; } } }
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
styleSheets |
1 | 12 | 1 | 4 | ≤12.1 | 4 | 4.4 | 18 | 4 | ≤12.1 | 3.2 | 1.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/Document/styleSheets