The preferredStyleSheetSet
property returns the preferred style sheet set as set by the page author.
Syntax
preferredStyleSheetSet = document.preferredStyleSheetSet
On return, preferredStyleSheetSet
indicates the author's preferred style sheet set. This is determined from the order of style sheet declarations and the Default-Style
HTTP header.
If there isn't a preferred style sheet set defined by the author, the empty string (""
) is returned.
Example
if (document.preferredStyleSheetSet) { console.log("The preferred style sheet set is: " + document.preferredStyleSheetSet); } else { console.log("There is no preferred style sheet."); }
Specifications
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
preferredStyleSheetSet | Chrome Full support 1 | Edge ? | Firefox Full support Yes | IE ? | Opera ? | Safari ? | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support Yes | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown