Search
Loading...
Skip to content

Interface: HTMLCreativeEngineCanvasElement

A wrapper around a plain canvas

The idea is to shield the user from the weird semantics of changing width and height of a canvas by making this a opaque block element instead and managing the internal render resolution of the canvas dynamically

Extends#

  • HTMLElement

Methods#

clear()#

clear(): void;

Clear the canvas

This is useful when mounting the canvas into a new position in the DOM. If the canvas is not cleared, it will appear in the new DOM position, with its contents stretched to the new size. It will re-render correctly during the next animation frame, but for a brief moment the canvas contents can flash distorted.

Call clear() before mounting into the DOM to avoid this. This will cause the canvas to be cleared until rendering the next frame.

Returns#

void


animate()#

animate(keyframes, options?): Animation;
MDN Reference

Parameters#

ParameterType
keyframesnull
options?number

Returns#

Animation

Inherited from#

HTMLElement.animate

getAnimations()#

getAnimations(options?): Animation[];
MDN Reference

Parameters#

ParameterType
options?GetAnimationsOptions

Returns#

Animation[]

Inherited from#

HTMLElement.getAnimations

after()#

after(...nodes): void;

Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.

Throws a “HierarchyRequestError” DOMException if the constraints of the node tree are violated.

MDN Reference

Parameters#

ParameterType
nodes(string

Returns#

void

Inherited from#

HTMLElement.after

before()#

before(...nodes): void;

Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.

Throws a “HierarchyRequestError” DOMException if the constraints of the node tree are violated.

MDN Reference

Parameters#

ParameterType
nodes(string

Returns#

void

Inherited from#

HTMLElement.before

remove()#

remove(): void;

Removes node.

MDN Reference

Returns#

void

Inherited from#

HTMLElement.remove

replaceWith()#

replaceWith(...nodes): void;

Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.

Throws a “HierarchyRequestError” DOMException if the constraints of the node tree are violated.

MDN Reference

Parameters#

ParameterType
nodes(string

Returns#

void

Inherited from#

HTMLElement.replaceWith

attachShadow()#

attachShadow(init): ShadowRoot;

Creates a shadow root for element and returns it.

MDN Reference

Parameters#

ParameterType
initShadowRootInit

Returns#

ShadowRoot

Inherited from#

HTMLElement.attachShadow

checkVisibility()#

checkVisibility(options?): boolean;
MDN Reference

Parameters#

ParameterType
options?CheckVisibilityOptions

Returns#

boolean

Inherited from#

HTMLElement.checkVisibility

closest()#

Call Signature#

closest<K>(selector): null | HTMLElementTagNameMap[K];

Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.

MDN Reference
Type Parameters#
Type Parameter
K extends keyof HTMLElementTagNameMap
Parameters#
ParameterType
selectorK
Returns#

null | HTMLElementTagNameMap[K]

Inherited from#
HTMLElement.closest

Call Signature#

closest<K>(selector): null | SVGElementTagNameMap[K];
Type Parameters#
Type Parameter
K extends keyof SVGElementTagNameMap
Parameters#
ParameterType
selectorK
Returns#

null | SVGElementTagNameMap[K]

Inherited from#
HTMLElement.closest

Call Signature#

closest<K>(selector): null | MathMLElementTagNameMap[K];
Type Parameters#
Type Parameter
K extends keyof MathMLElementTagNameMap
Parameters#
ParameterType
selectorK
Returns#

null | MathMLElementTagNameMap[K]

Inherited from#
HTMLElement.closest

Call Signature#

closest<E>(selectors): null | E;
Type Parameters#
Type ParameterDefault type
E extends ElementElement
Parameters#
ParameterType
selectorsstring
Returns#

null | E

Inherited from#
HTMLElement.closest

computedStyleMap()#

computedStyleMap(): StylePropertyMapReadOnly;
MDN Reference

Returns#

StylePropertyMapReadOnly

Inherited from#

HTMLElement.computedStyleMap

getAttribute()#

getAttribute(qualifiedName): null | string;

Returns element’s first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.

MDN Reference

Parameters#

ParameterType
qualifiedNamestring

Returns#

null | string

Inherited from#

HTMLElement.getAttribute

getAttributeNS()#

getAttributeNS(namespace, localName): null | string;

Returns element’s attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.

MDN Reference

Parameters#

ParameterType
namespacenull
localNamestring

Returns#

null | string

Inherited from#

HTMLElement.getAttributeNS

getAttributeNames()#

getAttributeNames(): string[];

Returns the qualified names of all element’s attributes. Can contain duplicates.

MDN Reference

Returns#

string[]

Inherited from#

HTMLElement.getAttributeNames

getAttributeNode()#

getAttributeNode(qualifiedName): null | Attr;
MDN Reference

Parameters#

ParameterType
qualifiedNamestring

Returns#

null | Attr

Inherited from#

HTMLElement.getAttributeNode

getAttributeNodeNS()#

getAttributeNodeNS(namespace, localName): null | Attr;
MDN Reference

Parameters#

ParameterType
namespacenull
localNamestring

Returns#

null | Attr

Inherited from#

HTMLElement.getAttributeNodeNS

getBoundingClientRect()#

getBoundingClientRect(): DOMRect;
MDN Reference

Returns#

DOMRect

Inherited from#

HTMLElement.getBoundingClientRect

getClientRects()#

getClientRects(): DOMRectList;
MDN Reference

Returns#

DOMRectList

Inherited from#

HTMLElement.getClientRects

getElementsByClassName()#

getElementsByClassName(classNames): HTMLCollectionOf<Element>;

Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.

MDN Reference

Parameters#

ParameterType
classNamesstring

Returns#

HTMLCollectionOf<Element>

Inherited from#

HTMLElement.getElementsByClassName

getElementsByTagName()#

Call Signature#

getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
MDN Reference
Type Parameters#
Type Parameter
K extends keyof HTMLElementTagNameMap
Parameters#
ParameterType
qualifiedNameK
Returns#

HTMLCollectionOf<HTMLElementTagNameMap[K]>

Inherited from#
HTMLElement.getElementsByTagName

Call Signature#

getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<SVGElementTagNameMap[K]>;
Type Parameters#
Type Parameter
K extends keyof SVGElementTagNameMap
Parameters#
ParameterType
qualifiedNameK
Returns#

HTMLCollectionOf<SVGElementTagNameMap[K]>

Inherited from#
HTMLElement.getElementsByTagName

Call Signature#

getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
Type Parameters#
Type Parameter
K extends keyof MathMLElementTagNameMap
Parameters#
ParameterType
qualifiedNameK
Returns#

HTMLCollectionOf<MathMLElementTagNameMap[K]>

Inherited from#
HTMLElement.getElementsByTagName

Call Signature#

getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
Type Parameters#
Type Parameter
K extends keyof HTMLElementDeprecatedTagNameMap
Parameters#
ParameterType
qualifiedNameK
Returns#

HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>

Deprecated#
Inherited from#
HTMLElement.getElementsByTagName

Call Signature#

getElementsByTagName(qualifiedName): HTMLCollectionOf<Element>;
Parameters#
ParameterType
qualifiedNamestring
Returns#

HTMLCollectionOf<Element>

Inherited from#
HTMLElement.getElementsByTagName

getElementsByTagNameNS()#

Call Signature#

getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<HTMLElement>;
MDN Reference
Parameters#
ParameterType
namespaceURI"http://www.w3.org/1999/xhtml"
localNamestring
Returns#

HTMLCollectionOf<HTMLElement>

Inherited from#
HTMLElement.getElementsByTagNameNS

Call Signature#

getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<SVGElement>;
Parameters#
ParameterType
namespaceURI"http://www.w3.org/2000/svg"
localNamestring
Returns#

HTMLCollectionOf<SVGElement>

Inherited from#
HTMLElement.getElementsByTagNameNS

Call Signature#

getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<MathMLElement>;
Parameters#
ParameterType
namespaceURI"http://www.w3.org/1998/Math/MathML"
localNamestring
Returns#

HTMLCollectionOf<MathMLElement>

Inherited from#
HTMLElement.getElementsByTagNameNS

Call Signature#

getElementsByTagNameNS(namespace, localName): HTMLCollectionOf<Element>;
Parameters#
ParameterType
namespacenull
localNamestring
Returns#

HTMLCollectionOf<Element>

Inherited from#
HTMLElement.getElementsByTagNameNS

getHTML()#

getHTML(options?): string;
MDN Reference

Parameters#

ParameterType
options?GetHTMLOptions

Returns#

string

Inherited from#

HTMLElement.getHTML

hasAttribute()#

hasAttribute(qualifiedName): boolean;

Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.

MDN Reference

Parameters#

ParameterType
qualifiedNamestring

Returns#

boolean

Inherited from#

HTMLElement.hasAttribute

hasAttributeNS()#

hasAttributeNS(namespace, localName): boolean;

Returns true if element has an attribute whose namespace is namespace and local name is localName.

MDN Reference

Parameters#

ParameterType
namespacenull
localNamestring

Returns#

boolean

Inherited from#

HTMLElement.hasAttributeNS

hasAttributes()#

hasAttributes(): boolean;

Returns true if element has attributes, and false otherwise.

MDN Reference

Returns#

boolean

Inherited from#

HTMLElement.hasAttributes

hasPointerCapture()#

hasPointerCapture(pointerId): boolean;
MDN Reference

Parameters#

ParameterType
pointerIdnumber

Returns#

boolean

Inherited from#

HTMLElement.hasPointerCapture

insertAdjacentElement()#

insertAdjacentElement(where, element): null | Element;
MDN Reference

Parameters#

ParameterType
whereInsertPosition
elementElement

Returns#

null | Element

Inherited from#

HTMLElement.insertAdjacentElement

insertAdjacentHTML()#

insertAdjacentHTML(position, string): void;
MDN Reference

Parameters#

ParameterType
positionInsertPosition
stringstring

Returns#

void

Inherited from#

HTMLElement.insertAdjacentHTML

insertAdjacentText()#

insertAdjacentText(where, data): void;
MDN Reference

Parameters#

ParameterType
whereInsertPosition
datastring

Returns#

void

Inherited from#

HTMLElement.insertAdjacentText

matches()#

matches(selectors): boolean;

Returns true if matching selectors against element’s root yields element, and false otherwise.

MDN Reference

Parameters#

ParameterType
selectorsstring

Returns#

boolean

Inherited from#

HTMLElement.matches

releasePointerCapture()#

releasePointerCapture(pointerId): void;
MDN Reference

Parameters#

ParameterType
pointerIdnumber

Returns#

void

Inherited from#

HTMLElement.releasePointerCapture

removeAttribute()#

removeAttribute(qualifiedName): void;

Removes element’s first attribute whose qualified name is qualifiedName.

MDN Reference

Parameters#

ParameterType
qualifiedNamestring

Returns#

void

Inherited from#

HTMLElement.removeAttribute

removeAttributeNS()#

removeAttributeNS(namespace, localName): void;

Removes element’s attribute whose namespace is namespace and local name is localName.

MDN Reference

Parameters#

ParameterType
namespacenull
localNamestring

Returns#

void

Inherited from#

HTMLElement.removeAttributeNS

removeAttributeNode()#

removeAttributeNode(attr): Attr;
MDN Reference

Parameters#

ParameterType
attrAttr

Returns#

Attr

Inherited from#

HTMLElement.removeAttributeNode

requestFullscreen()#

requestFullscreen(options?): Promise<void>;

Displays element fullscreen and resolves promise when done.

When supplied, options’s navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to “show”, navigation simplicity is preferred over screen space, and if set to “hide”, more screen space is preferred. User agents are always free to honor user preference over the application’s. The default value “auto” indicates no application preference.

MDN Reference

Parameters#

ParameterType
options?FullscreenOptions

Returns#

Promise<void>

Inherited from#

HTMLElement.requestFullscreen

requestPointerLock()#

requestPointerLock(options?): Promise<void>;
MDN Reference

Parameters#

ParameterType
options?PointerLockOptions

Returns#

Promise<void>

Inherited from#

HTMLElement.requestPointerLock

scroll()#

Call Signature#

scroll(options?): void;
MDN Reference
Parameters#
ParameterType
options?ScrollToOptions
Returns#

void

Inherited from#
HTMLElement.scroll

Call Signature#

scroll(x, y): void;
Parameters#
ParameterType
xnumber
ynumber
Returns#

void

Inherited from#
HTMLElement.scroll

scrollBy()#

Call Signature#

scrollBy(options?): void;
MDN Reference
Parameters#
ParameterType
options?ScrollToOptions
Returns#

void

Inherited from#
HTMLElement.scrollBy

Call Signature#

scrollBy(x, y): void;
Parameters#
ParameterType
xnumber
ynumber
Returns#

void

Inherited from#
HTMLElement.scrollBy

scrollIntoView()#

scrollIntoView(arg?): void;
MDN Reference

Parameters#

ParameterType
arg?boolean

Returns#

void

Inherited from#

HTMLElement.scrollIntoView

scrollTo()#

Call Signature#

scrollTo(options?): void;
MDN Reference
Parameters#
ParameterType
options?ScrollToOptions
Returns#

void

Inherited from#
HTMLElement.scrollTo

Call Signature#

scrollTo(x, y): void;
Parameters#
ParameterType
xnumber
ynumber
Returns#

void

Inherited from#
HTMLElement.scrollTo

setAttribute()#

setAttribute(qualifiedName, value): void;

Sets the value of element’s first attribute whose qualified name is qualifiedName to value.

MDN Reference

Parameters#

ParameterType
qualifiedNamestring
valuestring

Returns#

void

Inherited from#

HTMLElement.setAttribute

setAttributeNS()#

setAttributeNS(
namespace,
qualifiedName,
value): void;

Sets the value of element’s attribute whose namespace is namespace and local name is localName to value.

MDN Reference

Parameters#

ParameterType
namespacenull
qualifiedNamestring
valuestring

Returns#

void

Inherited from#

HTMLElement.setAttributeNS

setAttributeNode()#

setAttributeNode(attr): null | Attr;
MDN Reference

Parameters#

ParameterType
attrAttr

Returns#

null | Attr

Inherited from#

HTMLElement.setAttributeNode

setAttributeNodeNS()#

setAttributeNodeNS(attr): null | Attr;
MDN Reference

Parameters#

ParameterType
attrAttr

Returns#

null | Attr

Inherited from#

HTMLElement.setAttributeNodeNS

setHTMLUnsafe()#

setHTMLUnsafe(html): void;
MDN Reference

Parameters#

ParameterType
htmlstring

Returns#

void

Inherited from#

HTMLElement.setHTMLUnsafe

setPointerCapture()#

setPointerCapture(pointerId): void;
MDN Reference

Parameters#

ParameterType
pointerIdnumber

Returns#

void

Inherited from#

HTMLElement.setPointerCapture

toggleAttribute()#

toggleAttribute(qualifiedName, force?): boolean;

If force is not given, “toggles” qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.

Returns true if qualifiedName is now present, and false otherwise.

MDN Reference

Parameters#

ParameterType
qualifiedNamestring
force?boolean

Returns#

boolean

Inherited from#

HTMLElement.toggleAttribute

webkitMatchesSelector()#

webkitMatchesSelector(selectors): boolean;

Parameters#

ParameterType
selectorsstring

Returns#

boolean

Deprecated#

This is a legacy alias of matches.

MDN Reference

Inherited from#

HTMLElement.webkitMatchesSelector

dispatchEvent()#

dispatchEvent(event): boolean;

Dispatches a synthetic event event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

MDN Reference

Parameters#

ParameterType
eventEvent

Returns#

boolean

Inherited from#

HTMLElement.dispatchEvent

attachInternals()#

attachInternals(): ElementInternals;
MDN Reference

Returns#

ElementInternals

Inherited from#

HTMLElement.attachInternals

click()#

click(): void;
MDN Reference

Returns#

void

Inherited from#

HTMLElement.click

hidePopover()#

hidePopover(): void;
MDN Reference

Returns#

void

Inherited from#

HTMLElement.hidePopover

showPopover()#

showPopover(): void;
MDN Reference

Returns#

void

Inherited from#

HTMLElement.showPopover

togglePopover()#

togglePopover(force?): boolean;
MDN Reference

Parameters#

ParameterType
force?boolean

Returns#

boolean

Inherited from#

HTMLElement.togglePopover

addEventListener()#

Call Signature#

addEventListener<K>(
type,
listener,
options?): void;
Type Parameters#
Type Parameter
K extends keyof HTMLElementEventMap
Parameters#
ParameterType
typeK
listener(this, ev) => any
options?boolean
Returns#

void

Inherited from#
HTMLElement.addEventListener

Call Signature#

addEventListener(
type,
listener,
options?): void;
Parameters#
ParameterType
typestring
listenerEventListenerOrEventListenerObject
options?boolean
Returns#

void

Inherited from#
HTMLElement.addEventListener

removeEventListener()#

Call Signature#

removeEventListener<K>(
type,
listener,
options?): void;
Type Parameters#
Type Parameter
K extends keyof HTMLElementEventMap
Parameters#
ParameterType
typeK
listener(this, ev) => any
options?boolean
Returns#

void

Inherited from#
HTMLElement.removeEventListener

Call Signature#

removeEventListener(
type,
listener,
options?): void;
Parameters#
ParameterType
typestring
listenerEventListenerOrEventListenerObject
options?boolean
Returns#

void

Inherited from#
HTMLElement.removeEventListener

blur()#

blur(): void;
MDN Reference

Returns#

void

Inherited from#

HTMLElement.blur

focus()#

focus(options?): void;
MDN Reference

Parameters#

ParameterType
options?FocusOptions

Returns#

void

Inherited from#

HTMLElement.focus

appendChild()#

appendChild<T>(node): T;
MDN Reference

Type Parameters#

Type Parameter
T extends Node

Parameters#

ParameterType
nodeT

Returns#

T

Inherited from#

HTMLElement.appendChild

cloneNode()#

cloneNode(deep?): Node;

Returns a copy of node. If deep is true, the copy also includes the node’s descendants.

MDN Reference

Parameters#

ParameterType
deep?boolean

Returns#

Node

Inherited from#

HTMLElement.cloneNode

compareDocumentPosition()#

compareDocumentPosition(other): number;

Returns a bitmask indicating the position of other relative to node.

MDN Reference

Parameters#

ParameterType
otherNode

Returns#

number

Inherited from#

HTMLElement.compareDocumentPosition

contains()#

contains(other): boolean;

Returns true if other is an inclusive descendant of node, and false otherwise.

MDN Reference

Parameters#

ParameterType
othernull

Returns#

boolean

Inherited from#

HTMLElement.contains

getRootNode()#

getRootNode(options?): Node;

Returns node’s root.

MDN Reference

Parameters#

ParameterType
options?GetRootNodeOptions

Returns#

Node

Inherited from#

HTMLElement.getRootNode

hasChildNodes()#

hasChildNodes(): boolean;

Returns whether node has children.

MDN Reference

Returns#

boolean

Inherited from#

HTMLElement.hasChildNodes

insertBefore()#

insertBefore<T>(node, child): T;
MDN Reference

Type Parameters#

Type Parameter
T extends Node

Parameters#

ParameterType
nodeT
childnull

Returns#

T

Inherited from#

HTMLElement.insertBefore

isDefaultNamespace()#

isDefaultNamespace(namespace): boolean;
MDN Reference

Parameters#

ParameterType
namespacenull

Returns#

boolean

Inherited from#

HTMLElement.isDefaultNamespace

isEqualNode()#

isEqualNode(otherNode): boolean;

Returns whether node and otherNode have the same properties.

MDN Reference

Parameters#

ParameterType
otherNodenull

Returns#

boolean

Inherited from#

HTMLElement.isEqualNode

isSameNode()#

isSameNode(otherNode): boolean;
MDN Reference

Parameters#

ParameterType
otherNodenull

Returns#

boolean

Inherited from#

HTMLElement.isSameNode

lookupNamespaceURI()#

lookupNamespaceURI(prefix): null | string;
MDN Reference

Parameters#

ParameterType
prefixnull

Returns#

null | string

Inherited from#

HTMLElement.lookupNamespaceURI

lookupPrefix()#

lookupPrefix(namespace): null | string;
MDN Reference

Parameters#

ParameterType
namespacenull

Returns#

null | string

Inherited from#

HTMLElement.lookupPrefix

normalize()#

normalize(): void;

Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

MDN Reference

Returns#

void

Inherited from#

HTMLElement.normalize

removeChild()#

removeChild<T>(child): T;
MDN Reference

Type Parameters#

Type Parameter
T extends Node

Parameters#

ParameterType
childT

Returns#

T

Inherited from#

HTMLElement.removeChild

replaceChild()#

replaceChild<T>(node, child): T;
MDN Reference

Type Parameters#

Type Parameter
T extends Node

Parameters#

ParameterType
nodeNode
childT

Returns#

T

Inherited from#

HTMLElement.replaceChild

append()#

append(...nodes): void;

Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.

Throws a “HierarchyRequestError” DOMException if the constraints of the node tree are violated.

MDN Reference

Parameters#

ParameterType
nodes(string

Returns#

void

Inherited from#

HTMLElement.append

prepend()#

prepend(...nodes): void;

Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.

Throws a “HierarchyRequestError” DOMException if the constraints of the node tree are violated.

MDN Reference

Parameters#

ParameterType
nodes(string

Returns#

void

Inherited from#

HTMLElement.prepend

querySelector()#

Call Signature#

querySelector<K>(selectors): null | HTMLElementTagNameMap[K];

Returns the first element that is a descendant of node that matches selectors.

MDN Reference
Type Parameters#
Type Parameter
K extends keyof HTMLElementTagNameMap
Parameters#
ParameterType
selectorsK
Returns#

null | HTMLElementTagNameMap[K]

Inherited from#
HTMLElement.querySelector

Call Signature#

querySelector<K>(selectors): null | SVGElementTagNameMap[K];
Type Parameters#
Type Parameter
K extends keyof SVGElementTagNameMap
Parameters#
ParameterType
selectorsK
Returns#

null | SVGElementTagNameMap[K]

Inherited from#
HTMLElement.querySelector

Call Signature#

querySelector<K>(selectors): null | MathMLElementTagNameMap[K];
Type Parameters#
Type Parameter
K extends keyof MathMLElementTagNameMap
Parameters#
ParameterType
selectorsK
Returns#

null | MathMLElementTagNameMap[K]

Inherited from#
HTMLElement.querySelector

Call Signature#

querySelector<K>(selectors): null | HTMLElementDeprecatedTagNameMap[K];
Type Parameters#
Type Parameter
K extends keyof HTMLElementDeprecatedTagNameMap
Parameters#
ParameterType
selectorsK
Returns#

null | HTMLElementDeprecatedTagNameMap[K]

Deprecated#
Inherited from#
HTMLElement.querySelector

Call Signature#

querySelector<E>(selectors): null | E;
Type Parameters#
Type ParameterDefault type
E extends ElementElement
Parameters#
ParameterType
selectorsstring
Returns#

null | E

Inherited from#
HTMLElement.querySelector

querySelectorAll()#

Call Signature#

querySelectorAll<K>(selectors): NodeListOf<HTMLElementTagNameMap[K]>;

Returns all element descendants of node that match selectors.

MDN Reference
Type Parameters#
Type Parameter
K extends keyof HTMLElementTagNameMap
Parameters#
ParameterType
selectorsK
Returns#

NodeListOf<HTMLElementTagNameMap[K]>

Inherited from#
HTMLElement.querySelectorAll

Call Signature#

querySelectorAll<K>(selectors): NodeListOf<SVGElementTagNameMap[K]>;
Type Parameters#
Type Parameter
K extends keyof SVGElementTagNameMap
Parameters#
ParameterType
selectorsK
Returns#

NodeListOf<SVGElementTagNameMap[K]>

Inherited from#
HTMLElement.querySelectorAll

Call Signature#

querySelectorAll<K>(selectors): NodeListOf<MathMLElementTagNameMap[K]>;
Type Parameters#
Type Parameter
K extends keyof MathMLElementTagNameMap
Parameters#
ParameterType
selectorsK
Returns#

NodeListOf<MathMLElementTagNameMap[K]>

Inherited from#
HTMLElement.querySelectorAll

Call Signature#

querySelectorAll<K>(selectors): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
Type Parameters#
Type Parameter
K extends keyof HTMLElementDeprecatedTagNameMap
Parameters#
ParameterType
selectorsK
Returns#

NodeListOf<HTMLElementDeprecatedTagNameMap[K]>

Deprecated#
Inherited from#
HTMLElement.querySelectorAll

Call Signature#

querySelectorAll<E>(selectors): NodeListOf<E>;
Type Parameters#
Type ParameterDefault type
E extends ElementElement
Parameters#
ParameterType
selectorsstring
Returns#

NodeListOf<E>

Inherited from#
HTMLElement.querySelectorAll

replaceChildren()#

replaceChildren(...nodes): void;

Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.

Throws a “HierarchyRequestError” DOMException if the constraints of the node tree are violated.

MDN Reference

Parameters#

ParameterType
nodes(string

Returns#

void

Inherited from#

HTMLElement.replaceChildren

Properties#

PropertyModifierTypeDescriptionInherited from
ariaAtomicpublicnullstringMDN Reference
ariaAutoCompletepublicnullstringMDN Reference
ariaBrailleLabelpublicnullstringMDN Reference
ariaBrailleRoleDescriptionpublicnullstringMDN Reference
ariaBusypublicnullstringMDN Reference
ariaCheckedpublicnullstringMDN Reference
ariaColCountpublicnullstringMDN Reference
ariaColIndexpublicnullstringMDN Reference
ariaColSpanpublicnullstringMDN Reference
ariaCurrentpublicnullstringMDN Reference
ariaDescriptionpublicnullstringMDN Reference
ariaDisabledpublicnullstringMDN Reference
ariaExpandedpublicnullstringMDN Reference
ariaHasPopuppublicnullstringMDN Reference
ariaHiddenpublicnullstringMDN Reference
ariaInvalidpublicnullstring-
ariaKeyShortcutspublicnullstringMDN Reference
ariaLabelpublicnullstringMDN Reference
ariaLevelpublicnullstringMDN Reference
ariaLivepublicnullstringMDN Reference
ariaModalpublicnullstringMDN Reference
ariaMultiLinepublicnullstringMDN Reference
ariaMultiSelectablepublicnullstringMDN Reference
ariaOrientationpublicnullstringMDN Reference
ariaPlaceholderpublicnullstringMDN Reference
ariaPosInSetpublicnullstringMDN Reference
ariaPressedpublicnullstringMDN Reference
ariaReadOnlypublicnullstringMDN Reference
ariaRequiredpublicnullstringMDN Reference
ariaRoleDescriptionpublicnullstringMDN Reference
ariaRowCountpublicnullstringMDN Reference
ariaRowIndexpublicnullstringMDN Reference
ariaRowSpanpublicnullstringMDN Reference
ariaSelectedpublicnullstringMDN Reference
ariaSetSizepublicnullstringMDN Reference
ariaSortpublicnullstringMDN Reference
ariaValueMaxpublicnullstringMDN Reference
ariaValueMinpublicnullstringMDN Reference
ariaValueNowpublicnullstringMDN Reference
ariaValueTextpublicnullstringMDN Reference
rolepublicnullstring-
attributesreadonlyNamedNodeMapMDN ReferenceHTMLElement.attributes
classListreadonlyDOMTokenListAllows for manipulation of element’s class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. MDN ReferenceHTMLElement.classList
classNamepublicstringReturns the value of element’s class content attribute. Can be set to change it. MDN ReferenceHTMLElement.className
clientHeightreadonlynumberMDN ReferenceHTMLElement.clientHeight
clientLeftreadonlynumberMDN ReferenceHTMLElement.clientLeft
clientTopreadonlynumberMDN ReferenceHTMLElement.clientTop
clientWidthreadonlynumberMDN ReferenceHTMLElement.clientWidth
idpublicstringReturns the value of element’s id content attribute. Can be set to change it. MDN ReferenceHTMLElement.id
innerHTMLpublicstringMDN ReferenceHTMLElement.innerHTML
localNamereadonlystringReturns the local name. MDN ReferenceHTMLElement.localName
namespaceURIreadonlynullstringReturns the namespace. MDN Reference
onfullscreenchangepublicnull(this, ev) => anyMDN Reference
onfullscreenerrorpublicnull(this, ev) => anyMDN Reference
outerHTMLpublicstringMDN ReferenceHTMLElement.outerHTML
ownerDocumentreadonlyDocumentReturns the node document. Returns null for documents. MDN ReferenceHTMLElement.ownerDocument
partreadonlyDOMTokenListMDN ReferenceHTMLElement.part
prefixreadonlynullstringReturns the namespace prefix. MDN Reference
scrollHeightreadonlynumberMDN ReferenceHTMLElement.scrollHeight
scrollLeftpublicnumberMDN ReferenceHTMLElement.scrollLeft
scrollToppublicnumberMDN ReferenceHTMLElement.scrollTop
scrollWidthreadonlynumberMDN ReferenceHTMLElement.scrollWidth
shadowRootreadonlynullShadowRootReturns element’s shadow root, if any, and if shadow root’s mode is “open”, and null otherwise. MDN Reference
slotpublicstringReturns the value of element’s slot content attribute. Can be set to change it. MDN ReferenceHTMLElement.slot
tagNamereadonlystringReturns the HTML-uppercased qualified name. MDN ReferenceHTMLElement.tagName
attributeStyleMapreadonlyStylePropertyMapMDN ReferenceHTMLElement.attributeStyleMap
stylereadonlyCSSStyleDeclarationMDN ReferenceHTMLElement.style
contentEditablepublicstringMDN ReferenceHTMLElement.contentEditable
enterKeyHintpublicstringMDN ReferenceHTMLElement.enterKeyHint
inputModepublicstringMDN ReferenceHTMLElement.inputMode
isContentEditablereadonlybooleanMDN ReferenceHTMLElement.isContentEditable
onabortpublicnull(this, ev) => anyFires when the user aborts the download. Param The event. MDN Reference
onanimationcancelpublicnull(this, ev) => anyMDN Reference
onanimationendpublicnull(this, ev) => anyMDN Reference
onanimationiterationpublicnull(this, ev) => anyMDN Reference
onanimationstartpublicnull(this, ev) => anyMDN Reference
onauxclickpublicnull(this, ev) => anyMDN Reference
onbeforeinputpublicnull(this, ev) => anyMDN Reference
onbeforetogglepublicnull(this, ev) => anyMDN Reference
onblurpublicnull(this, ev) => anyFires when the object loses the input focus. Param The focus event. MDN Reference
oncancelpublicnull(this, ev) => anyMDN Reference
oncanplaypublicnull(this, ev) => anyOccurs when playback is possible, but would require further buffering. Param The event. MDN Reference
oncanplaythroughpublicnull(this, ev) => anyMDN Reference
onchangepublicnull(this, ev) => anyFires when the contents of the object or selection have changed. Param The event. MDN Reference
onclickpublicnull(this, ev) => anyFires when the user clicks the left mouse button on the object Param The mouse event. MDN Reference
onclosepublicnull(this, ev) => anyMDN Reference
oncontextlostpublicnull(this, ev) => anyMDN Reference
oncontextmenupublicnull(this, ev) => anyFires when the user clicks the right mouse button in the client area, opening the context menu. Param The mouse event. MDN Reference
oncontextrestoredpublicnull(this, ev) => anyMDN Reference
oncopypublicnull(this, ev) => anyMDN Reference
oncuechangepublicnull(this, ev) => anyMDN Reference
oncutpublicnull(this, ev) => anyMDN Reference
ondblclickpublicnull(this, ev) => anyFires when the user double-clicks the object. Param The mouse event. MDN Reference
ondragpublicnull(this, ev) => anyFires on the source object continuously during a drag operation. Param The event. MDN Reference
ondragendpublicnull(this, ev) => anyFires on the source object when the user releases the mouse at the close of a drag operation. Param The event. MDN Reference
ondragenterpublicnull(this, ev) => anyFires on the target element when the user drags the object to a valid drop target. Param The drag event. MDN Reference
ondragleavepublicnull(this, ev) => anyFires on the target object when the user moves the mouse out of a valid drop target during a drag operation. Param The drag event. MDN Reference
ondragoverpublicnull(this, ev) => anyFires on the target element continuously while the user drags the object over a valid drop target. Param The event. MDN Reference
ondragstartpublicnull(this, ev) => anyFires on the source object when the user starts to drag a text selection or selected object. Param The event. MDN Reference
ondroppublicnull(this, ev) => anyMDN Reference
ondurationchangepublicnull(this, ev) => anyOccurs when the duration attribute is updated. Param The event. MDN Reference
onemptiedpublicnull(this, ev) => anyOccurs when the media element is reset to its initial state. Param The event. MDN Reference
onendedpublicnull(this, ev) => anyOccurs when the end of playback is reached. Param The event MDN Reference
onerrorpublicOnErrorEventHandlerFires when an error occurs during object loading. Param The event. MDN ReferenceHTMLElement.onerror
onfocuspublicnull(this, ev) => anyFires when the object receives focus. Param The event. MDN Reference
onformdatapublicnull(this, ev) => anyMDN Reference
ongotpointercapturepublicnull(this, ev) => anyMDN Reference
oninputpublicnull(this, ev) => anyMDN Reference
oninvalidpublicnull(this, ev) => anyMDN Reference
onkeydownpublicnull(this, ev) => anyFires when the user presses a key. Param The keyboard event MDN Reference
onkeypresspublicnull(this, ev) => anyFires when the user presses an alphanumeric key. Param The event. Deprecated MDN Reference
onkeyuppublicnull(this, ev) => anyFires when the user releases a key. Param The keyboard event MDN Reference
onloadpublicnull(this, ev) => anyFires immediately after the browser loads the object. Param The event. MDN Reference
onloadeddatapublicnull(this, ev) => anyOccurs when media data is loaded at the current playback position. Param The event. MDN Reference
onloadedmetadatapublicnull(this, ev) => anyOccurs when the duration and dimensions of the media have been determined. Param The event. MDN Reference
onloadstartpublicnull(this, ev) => anyOccurs when Internet Explorer begins looking for media data. Param The event. MDN Reference
onlostpointercapturepublicnull(this, ev) => anyMDN Reference
onmousedownpublicnull(this, ev) => anyFires when the user clicks the object with either mouse button. Param The mouse event. MDN Reference
onmouseenterpublicnull(this, ev) => anyMDN Reference
onmouseleavepublicnull(this, ev) => anyMDN Reference
onmousemovepublicnull(this, ev) => anyFires when the user moves the mouse over the object. Param The mouse event. MDN Reference
onmouseoutpublicnull(this, ev) => anyFires when the user moves the mouse pointer outside the boundaries of the object. Param The mouse event. MDN Reference
onmouseoverpublicnull(this, ev) => anyFires when the user moves the mouse pointer into the object. Param The mouse event. MDN Reference
onmouseuppublicnull(this, ev) => anyFires when the user releases a mouse button while the mouse is over the object. Param The mouse event. MDN Reference
onpastepublicnull(this, ev) => anyMDN Reference
onpausepublicnull(this, ev) => anyOccurs when playback is paused. Param The event. MDN Reference
onplaypublicnull(this, ev) => anyOccurs when the play method is requested. Param The event. MDN Reference
onplayingpublicnull(this, ev) => anyOccurs when the audio or video has started playing. Param The event. MDN Reference
onpointercancelpublicnull(this, ev) => anyMDN Reference
onpointerdownpublicnull(this, ev) => anyMDN Reference
onpointerenterpublicnull(this, ev) => anyMDN Reference
onpointerleavepublicnull(this, ev) => anyMDN Reference
onpointermovepublicnull(this, ev) => anyMDN Reference
onpointeroutpublicnull(this, ev) => anyMDN Reference
onpointeroverpublicnull(this, ev) => anyMDN Reference
onpointeruppublicnull(this, ev) => anyMDN Reference
onprogresspublicnull(this, ev) => anyOccurs to indicate progress while downloading media data. Param The event. MDN Reference
onratechangepublicnull(this, ev) => anyOccurs when the playback rate is increased or decreased. Param The event. MDN Reference
onresetpublicnull(this, ev) => anyFires when the user resets a form. Param The event. MDN Reference
onresizepublicnull(this, ev) => anyMDN Reference
onscrollpublicnull(this, ev) => anyFires when the user repositions the scroll box in the scroll bar on the object. Param The event. MDN Reference
onscrollendpublicnull(this, ev) => anyMDN Reference
onsecuritypolicyviolationpublicnull(this, ev) => anyMDN Reference
onseekedpublicnull(this, ev) => anyOccurs when the seek operation ends. Param The event. MDN Reference
onseekingpublicnull(this, ev) => anyOccurs when the current playback position is moved. Param The event. MDN Reference
onselectpublicnull(this, ev) => anyFires when the current selection changes. Param The event. MDN Reference
onselectionchangepublicnull(this, ev) => anyMDN Reference
onselectstartpublicnull(this, ev) => anyMDN Reference
onslotchangepublicnull(this, ev) => anyMDN Reference
onstalledpublicnull(this, ev) => anyOccurs when the download has stopped. Param The event. MDN Reference
onsubmitpublicnull(this, ev) => anyMDN Reference
onsuspendpublicnull(this, ev) => anyOccurs if the load operation has been intentionally halted. Param The event. MDN Reference
ontimeupdatepublicnull(this, ev) => anyOccurs to indicate the current playback position. Param The event. MDN Reference
ontogglepublicnull(this, ev) => anyMDN Reference
ontouchcancel?publicnull(this, ev) => anyMDN Reference
ontouchend?publicnull(this, ev) => anyMDN Reference
ontouchmove?publicnull(this, ev) => anyMDN Reference
ontouchstart?publicnull(this, ev) => anyMDN Reference
ontransitioncancelpublicnull(this, ev) => anyMDN Reference
ontransitionendpublicnull(this, ev) => anyMDN Reference
ontransitionrunpublicnull(this, ev) => anyMDN Reference
ontransitionstartpublicnull(this, ev) => anyMDN Reference
onvolumechangepublicnull(this, ev) => anyOccurs when the volume is changed, or playback is muted or unmuted. Param The event. MDN Reference
onwaitingpublicnull(this, ev) => anyOccurs when playback stops because the next frame of a video resource is not available. Param The event. MDN Reference
onwebkitanimationendpublicnull(this, ev) => anyDeprecated This is a legacy alias of onanimationend. MDN Reference
onwebkitanimationiterationpublicnull(this, ev) => anyDeprecated This is a legacy alias of onanimationiteration. MDN Reference
onwebkitanimationstartpublicnull(this, ev) => anyDeprecated This is a legacy alias of onanimationstart. MDN Reference
onwebkittransitionendpublicnull(this, ev) => anyDeprecated This is a legacy alias of ontransitionend. MDN Reference
onwheelpublicnull(this, ev) => anyMDN Reference
accessKeypublicstringMDN ReferenceHTMLElement.accessKey
accessKeyLabelreadonlystringMDN ReferenceHTMLElement.accessKeyLabel
autocapitalizepublicstringMDN ReferenceHTMLElement.autocapitalize
dirpublicstringMDN ReferenceHTMLElement.dir
draggablepublicbooleanMDN ReferenceHTMLElement.draggable
hiddenpublicbooleanMDN ReferenceHTMLElement.hidden
inertpublicbooleanMDN ReferenceHTMLElement.inert
innerTextpublicstringMDN ReferenceHTMLElement.innerText
langpublicstringMDN ReferenceHTMLElement.lang
offsetHeightreadonlynumberMDN ReferenceHTMLElement.offsetHeight
offsetLeftreadonlynumberMDN ReferenceHTMLElement.offsetLeft
offsetParentreadonlynullElementMDN Reference
offsetTopreadonlynumberMDN ReferenceHTMLElement.offsetTop
offsetWidthreadonlynumberMDN ReferenceHTMLElement.offsetWidth
outerTextpublicstringMDN ReferenceHTMLElement.outerText
popoverpublicnullstringMDN Reference
spellcheckpublicbooleanMDN ReferenceHTMLElement.spellcheck
titlepublicstringMDN ReferenceHTMLElement.title
translatepublicbooleanMDN ReferenceHTMLElement.translate
autofocuspublicbooleanMDN ReferenceHTMLElement.autofocus
datasetreadonlyDOMStringMapMDN ReferenceHTMLElement.dataset
nonce?publicstringMDN ReferenceHTMLElement.nonce
tabIndexpublicnumberMDN ReferenceHTMLElement.tabIndex
baseURIreadonlystringReturns node’s node document’s document base URL. MDN ReferenceHTMLElement.baseURI
childNodesreadonlyNodeListOf<ChildNode>Returns the children. MDN ReferenceHTMLElement.childNodes
firstChildreadonlynullChildNodeReturns the first child. MDN Reference
isConnectedreadonlybooleanReturns true if node is connected and false otherwise. MDN ReferenceHTMLElement.isConnected
lastChildreadonlynullChildNodeReturns the last child. MDN Reference
nextSiblingreadonlynullChildNodeReturns the next sibling. MDN Reference
nodeNamereadonlystringReturns a string appropriate for the type of node. MDN ReferenceHTMLElement.nodeName
nodeTypereadonlynumberReturns the type of node. MDN ReferenceHTMLElement.nodeType
nodeValuepublicnullstringMDN Reference
parentElementreadonlynullHTMLElementReturns the parent element. MDN Reference
parentNodereadonlynullParentNodeReturns the parent. MDN Reference
previousSiblingreadonlynullChildNodeReturns the previous sibling. MDN Reference
textContentpublicnullstringMDN Reference
ELEMENT_NODEreadonly1node is an element.HTMLElement.ELEMENT_NODE
ATTRIBUTE_NODEreadonly2-HTMLElement.ATTRIBUTE_NODE
TEXT_NODEreadonly3node is a Text node.HTMLElement.TEXT_NODE
CDATA_SECTION_NODEreadonly4node is a CDATASection node.HTMLElement.CDATA_SECTION_NODE
ENTITY_REFERENCE_NODEreadonly5-HTMLElement.ENTITY_REFERENCE_NODE
ENTITY_NODEreadonly6-HTMLElement.ENTITY_NODE
PROCESSING_INSTRUCTION_NODEreadonly7node is a ProcessingInstruction node.HTMLElement.PROCESSING_INSTRUCTION_NODE
COMMENT_NODEreadonly8node is a Comment node.HTMLElement.COMMENT_NODE
DOCUMENT_NODEreadonly9node is a document.HTMLElement.DOCUMENT_NODE
DOCUMENT_TYPE_NODEreadonly10node is a doctype.HTMLElement.DOCUMENT_TYPE_NODE
DOCUMENT_FRAGMENT_NODEreadonly11node is a DocumentFragment node.HTMLElement.DOCUMENT_FRAGMENT_NODE
NOTATION_NODEreadonly12-HTMLElement.NOTATION_NODE
DOCUMENT_POSITION_DISCONNECTEDreadonly1Set when node and other are not in the same tree.HTMLElement.DOCUMENT_POSITION_DISCONNECTED
DOCUMENT_POSITION_PRECEDINGreadonly2Set when other is preceding node.HTMLElement.DOCUMENT_POSITION_PRECEDING
DOCUMENT_POSITION_FOLLOWINGreadonly4Set when other is following node.HTMLElement.DOCUMENT_POSITION_FOLLOWING
DOCUMENT_POSITION_CONTAINSreadonly8Set when other is an ancestor of node.HTMLElement.DOCUMENT_POSITION_CONTAINS
DOCUMENT_POSITION_CONTAINED_BYreadonly16Set when other is a descendant of node.HTMLElement.DOCUMENT_POSITION_CONTAINED_BY
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFICreadonly32-HTMLElement.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
nextElementSiblingreadonlynullElementReturns the first following sibling that is an element, and null otherwise. MDN Reference
previousElementSiblingreadonlynullElementReturns the first preceding sibling that is an element, and null otherwise. MDN Reference
childElementCountreadonlynumberMDN ReferenceHTMLElement.childElementCount
childrenreadonlyHTMLCollectionReturns the child elements. MDN ReferenceHTMLElement.children
firstElementChildreadonlynullElementReturns the first child that is an element, and null otherwise. MDN Reference
lastElementChildreadonlynullElementReturns the last child that is an element, and null otherwise. MDN Reference
assignedSlotreadonlynullHTMLSlotElementMDN Reference