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.


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


Specification Status Comment
WHATWG HTML Living Standard
The definition of 'scoped' in that specification.
Living Standard No change from HTML5.
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


© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.

API HTML DOM HTMLStyleElement Property Reference Référence