Skip to main content

DocumentOrShadowRoot

Extended by

Methods

elementFromPoint()

elementFromPoint(x, y): Element | null;

Parameters

ParameterType
xnumber
ynumber

Returns

Element | null


elementsFromPoint()

elementsFromPoint(x, y): Element[];

Parameters

ParameterType
xnumber
ynumber

Returns

Element[]


getAnimations()

getAnimations(): Animation[];

MDN Reference

Returns

Animation[]

Properties

activeElement

readonly activeElement: Element | null;

Returns the deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document.

For the purposes of this API, when a child browsing context is focused, its container is focused in the parent browsing context. For example, if the user moves the focus to a text control in an iframe, the iframe is the element returned by the activeElement API in the iframe's node document.

Similarly, when the focused element is in a different node tree than documentOrShadowRoot, the element returned will be the host that's located in the same node tree as documentOrShadowRoot if documentOrShadowRoot is a shadow-including inclusive ancestor of the focused element, and null if not.

MDN Reference


adoptedStyleSheets

adoptedStyleSheets: CSSStyleSheet[];

MDN Reference


customElementRegistry

readonly customElementRegistry: CustomElementRegistry | null;

fullscreenElement

readonly fullscreenElement: Element | null;

Returns document's fullscreen element.

MDN Reference


pictureInPictureElement

readonly pictureInPictureElement: Element | null;

MDN Reference


pointerLockElement

readonly pointerLockElement: Element | null;

MDN Reference


styleSheets

readonly styleSheets: StyleSheetList;

MDN Reference