Questa traduzione è incompleta. Aiutaci a tradurre questo articolo dall’inglese

L'interfaccia ShadowRoot del DOM API Shadow  è il nodo padre di un sotto albero del DOM che viene renderizzato separatamente dall'albero principale del DOM.


ShadowRoot.mode Read only
The mode of the ShadowRoot: either "open" or "closed".
Setting the mode of a shadow root to "closed" makes the shadow root’s implementation internals inaccessible and unchangeable from JavaScript—in the same way the implementation internals of, for example, the <video> element are inaccessible and unchangeable from JavaScript. Read only
A DOM element to which the ShadowRoot is attached.
The DOM tree inside the ShadowRoot.


Specification Status Comment
The definition of 'Interface ShadowRoot' in that specification.
Living Standard  

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 53 No support[1] No support[2] No support 40 10
Feature Android Edge Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 53 No support[1] No support[2] No support 40 10.1

[1] This feature is not implemented yet. See the Edge platform status.

[2] This feature is implemented behind the preference dom.webcomponents.enabled, defaulting to false. See bug 1205323.