Document.styleSheetSets

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The styleSheetSets read-only property returns a live list of all of the currently-available style sheet sets.

Syntax

var sets = document.styleSheetSets;

On return, sets is a list of style sheet sets that are available.

Example

Given an <ul> (list) element with the ID "sheetList", you can populate it with the names of all the available style sheet sets with code like this:

let list = document.getElementById('sheetList');
let sheets = document.styleSheetSets;

list.innerHTML = '';

for (let i = 0; i < sheets.length; i++) {
  let item = document.createElement('li');

  item.innerHTML = sheets[i];
  list.appendChild(item);
}

Notes

The list of available style sheet sets is constructed by enumerating all the style sheets available for the document, in the order in which they're listed in the document.styleSheets attribute, adding the title of each style sheet that has a title to the list. Duplicates are dropped from the list (using a case-sensitive comparison).

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
styleSheetSets
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox Full support YesIE No support NoOpera ? Safari ? WebView Android No support NoChrome Android No support NoFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

See also