HTMLStyleElement.scoped

The HTMLStyleElement.scoped property is a Boolean value indicating if the element applies to the whole document (false) or only to the parent's sub-tree (true).

By default it contains the value of the scoped.

Syntax

JavaScript
<var>value</var> = style.scoped;
style.scoped = true;

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'scoped' in that specification.
Living Standard No change from HTML5.
HTML5.1
The definition of 'scoped' in that specification.
Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support Not supported [1] 21.0 (21.0) Not supported Not supported Not supported
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic suppport ? 21.0 (21.0) Not supported Not supported Not supported

[1] Chrome 19 up to 34 supports it after activating the ‘Enable <style scoped>’ entry in chrome://flags. Removed in Chrome 35 and later.

See also

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/api/htmlstyleelement/scoped

API HTML DOM HTMLStyleElement Property Reference Référence