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 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); }
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.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
lastStyleSheetSet | Chrome No support No | Edge No support No | Firefox Full support Yes | IE ? | Opera ? | Safari ? | WebView Android No support No | Chrome Android No support No | Firefox Android Full support Yes | Opera 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.