shadowRoot

The shadowRoot JS Element returns element’s shadow root, if any, and if shadow root’s mode is "open", and null otherwise.

Syntax

shadow = element.shadowRoot

Examples

1 · closed

2 · open

attachShadow

attachShadow

classList

className

closest

getAttribute

getAttributeNames

getAttributeNS

hasAttribute

hasAttributeNS

hasAttributes

id

innerHTML

insertAdjacentHTML

localName

matches

namespaceURI

outerHTML

prefix

removeAttribute

removeAttributeNS

setAttribute

setAttributeNS

slot

tagName

toggleAttribute

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu