StyleSheet.disabled
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.
disabled
は StyleSheet
インターフェイスのプロパティで、
このプロパティは、スタイルシートが文書内に適用されないようにするかどうかを決定します。
スタイルシートは、手動でこのプロパティを true
に設定するか、非アクティブな代替スタイルシートに設定すると、無効になることがあります。なお、 disabled === false
であることは、スタイルシートが適用されていることを保証するものではありません(例えば、文書内のスタイルシートが削除されている可能性もあります)。
値
論理値です。
例
js
// スタイルシートが無効であれば
if (stylesheet.disabled) {
// スタイルをインラインで適用
}
仕様書
Specification |
---|
CSS Object Model (CSSOM) # dom-stylesheet-disabled |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
disabled |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.