Document.lastStyleSheetSet

翻译不完整。 请帮助我们翻译这篇文章!

已废弃
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.

Document.lastStyleSheetSet 返回最后一个启用的样式表集合。当 document.selectedStyleSheetSet 属性发生变化时,这个属性的值就会随之发生变化。

语法

var lastStyleSheetSet = document.lastStyleSheetSet

返回时, lastStyleSheetSet 指示最近设置的样式表。 如果当前样式表集尚未通过设置更改 document.selectedStyleSheetSet, 则返回值为 null

注意:  当document.enableStyleSheetsForSet() 被执行时,该值不会该变。

示例

let lastSheetSet = document.lastStyleSheetSet;

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

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
lastStyleSheetSet
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox Full support 3IE No support NoOpera ? Safari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 4Opera Android ? Safari iOS No support NoSamsung 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.

相关链接