ShadowRoot

EventTargetNodeDocumentFragmentjs.html.ShadowRoot (extern class)

The ShadowRoot interface of the Shadow DOM API is the root node of a DOM subtree that is rendered separately from a document's main DOM tree.

Documentation ShadowRoot by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Instance Members

The mode of the ShadowRoot — either open or closed. This defines whether or not the shadow root's internal features are accessible from JavaScript.


host: Element

Returns a reference to the DOM element the ShadowRoot is attached to.


innerHTML: String

Sets or returns a reference to the DOM tree inside the ShadowRoot.


activeElement: Element

styleSheets: StyleSheetList

pointerLockElement: Element

fullscreenElement: Element

getElementById(elementId: String): Element
Name Type
elementId String
Returns
Element

getElementsByTagName(localName: String): HTMLCollection
Name Type
localName String
Returns
HTMLCollection

getElementsByTagNameNS(namespace: String, localName: String): HTMLCollection
Name Type
namespace String
localName String
Returns
HTMLCollection

getElementsByClassName(classNames: String): HTMLCollection
Name Type
classNames String
Returns
HTMLCollection

elementFromPoint(x: Float, y: Float): Element
Name Type
x Float
y Float
Returns
Element

elementsFromPoint(x: Float, y: Float): Array<Element>
Name Type
x Float
y Float
Returns
Array<Element>