Document.lastStyleSheetSet

You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!

The Document.lastStyleSheetSet property returns the last enabled style sheet set. This property's value changes whenever the document.selectedStyleSheetSet property is changed.

Syntax

var lastStyleSheetSet = document.lastStyleSheetSet

On return, lastStyleSheetSet indicates the style sheet set that was most recently set. If the current style sheet set has not been changed by setting document.selectedStyleSheetSet, the returned value is null.

Note: This value doesn't change when document.enableStyleSheetsForSet() is called.

Example

let lastSheetSet = document.lastStyleSheetSet;

if (!lastSheetSet) {
  lastSheetSet = 'Style sheet not yet changed';
}
else {
  console.log('The last style sheet set is: ' + lastSheetSet);
}

Specifications

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
lastStyleSheetSetChrome No support NoEdge ? Firefox Full support YesIE ? Opera ? Safari ? WebView Android No support NoChrome Android No support NoFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also