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
keyframesKeyframe[]
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): 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#

HTMLElementTagNameMap[K]

Inherited from#
HTMLElement.closest

Call Signature#

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

SVGElementTagNameMap[K]

Inherited from#
HTMLElement.closest

Call Signature#

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

MathMLElementTagNameMap[K]

Inherited from#
HTMLElement.closest

Call Signature#

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

E

Inherited from#
HTMLElement.closest

computedStyleMap()#

computedStyleMap(): StylePropertyMapReadOnly;
MDN Reference

Returns#

StylePropertyMapReadOnly

Inherited from#

HTMLElement.computedStyleMap

getAttribute()#

getAttribute(qualifiedName): 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#

string

Inherited from#

HTMLElement.getAttribute

getAttributeNS()#

getAttributeNS(namespace, localName): 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
namespacestring
localNamestring

Returns#

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): Attr;
MDN Reference

Parameters#

ParameterType
qualifiedNamestring

Returns#

Attr

Inherited from#

HTMLElement.getAttributeNode

getAttributeNodeNS()#

getAttributeNodeNS(namespace, localName): Attr;
MDN Reference

Parameters#

ParameterType
namespacestring
localNamestring

Returns#

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
namespacestring
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
namespacestring
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): Element;
MDN Reference

Parameters#

ParameterType
whereInsertPosition
elementElement

Returns#

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
namespacestring
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
namespacestring
qualifiedNamestring
valuestring

Returns#

void

Inherited from#

HTMLElement.setAttributeNS

setAttributeNode()#

setAttributeNode(attr): Attr;
MDN Reference

Parameters#

ParameterType
attrAttr

Returns#

Attr

Inherited from#

HTMLElement.setAttributeNode

setAttributeNodeNS()#

setAttributeNodeNS(attr): Attr;
MDN Reference

Parameters#

ParameterType
attrAttr

Returns#

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
otherNode

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
childNode

Returns#

T

Inherited from#

HTMLElement.insertBefore

isDefaultNamespace()#

isDefaultNamespace(namespace): boolean;
MDN Reference

Parameters#

ParameterType
namespacestring

Returns#

boolean

Inherited from#

HTMLElement.isDefaultNamespace

isEqualNode()#

isEqualNode(otherNode): boolean;

Returns whether node and otherNode have the same properties.

MDN Reference

Parameters#

ParameterType
otherNodeNode

Returns#

boolean

Inherited from#

HTMLElement.isEqualNode

isSameNode()#

isSameNode(otherNode): boolean;
MDN Reference

Parameters#

ParameterType
otherNodeNode

Returns#

boolean

Inherited from#

HTMLElement.isSameNode

lookupNamespaceURI()#

lookupNamespaceURI(prefix): string;
MDN Reference

Parameters#

ParameterType
prefixstring

Returns#

string

Inherited from#

HTMLElement.lookupNamespaceURI

lookupPrefix()#

lookupPrefix(namespace): string;
MDN Reference

Parameters#

ParameterType
namespacestring

Returns#

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): 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#

HTMLElementTagNameMap[K]

Inherited from#
HTMLElement.querySelector

Call Signature#

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

SVGElementTagNameMap[K]

Inherited from#
HTMLElement.querySelector

Call Signature#

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

MathMLElementTagNameMap[K]

Inherited from#
HTMLElement.querySelector

Call Signature#

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

HTMLElementDeprecatedTagNameMap[K]

Deprecated#
Inherited from#
HTMLElement.querySelector

Call Signature#

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

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
ariaAtomicpublicstringMDN ReferenceHTMLElement.ariaAtomic
ariaAutoCompletepublicstringMDN ReferenceHTMLElement.ariaAutoComplete
ariaBrailleLabelpublicstringMDN ReferenceHTMLElement.ariaBrailleLabel
ariaBrailleRoleDescriptionpublicstringMDN ReferenceHTMLElement.ariaBrailleRoleDescription
ariaBusypublicstringMDN ReferenceHTMLElement.ariaBusy
ariaCheckedpublicstringMDN ReferenceHTMLElement.ariaChecked
ariaColCountpublicstringMDN ReferenceHTMLElement.ariaColCount
ariaColIndexpublicstringMDN ReferenceHTMLElement.ariaColIndex
ariaColSpanpublicstringMDN ReferenceHTMLElement.ariaColSpan
ariaCurrentpublicstringMDN ReferenceHTMLElement.ariaCurrent
ariaDescriptionpublicstringMDN ReferenceHTMLElement.ariaDescription
ariaDisabledpublicstringMDN ReferenceHTMLElement.ariaDisabled
ariaExpandedpublicstringMDN ReferenceHTMLElement.ariaExpanded
ariaHasPopuppublicstringMDN ReferenceHTMLElement.ariaHasPopup
ariaHiddenpublicstringMDN ReferenceHTMLElement.ariaHidden
ariaInvalidpublicstring-HTMLElement.ariaInvalid
ariaKeyShortcutspublicstringMDN ReferenceHTMLElement.ariaKeyShortcuts
ariaLabelpublicstringMDN ReferenceHTMLElement.ariaLabel
ariaLevelpublicstringMDN ReferenceHTMLElement.ariaLevel
ariaLivepublicstringMDN ReferenceHTMLElement.ariaLive
ariaModalpublicstringMDN ReferenceHTMLElement.ariaModal
ariaMultiLinepublicstringMDN ReferenceHTMLElement.ariaMultiLine
ariaMultiSelectablepublicstringMDN ReferenceHTMLElement.ariaMultiSelectable
ariaOrientationpublicstringMDN ReferenceHTMLElement.ariaOrientation
ariaPlaceholderpublicstringMDN ReferenceHTMLElement.ariaPlaceholder
ariaPosInSetpublicstringMDN ReferenceHTMLElement.ariaPosInSet
ariaPressedpublicstringMDN ReferenceHTMLElement.ariaPressed
ariaReadOnlypublicstringMDN ReferenceHTMLElement.ariaReadOnly
ariaRequiredpublicstringMDN ReferenceHTMLElement.ariaRequired
ariaRoleDescriptionpublicstringMDN ReferenceHTMLElement.ariaRoleDescription
ariaRowCountpublicstringMDN ReferenceHTMLElement.ariaRowCount
ariaRowIndexpublicstringMDN ReferenceHTMLElement.ariaRowIndex
ariaRowSpanpublicstringMDN ReferenceHTMLElement.ariaRowSpan
ariaSelectedpublicstringMDN ReferenceHTMLElement.ariaSelected
ariaSetSizepublicstringMDN ReferenceHTMLElement.ariaSetSize
ariaSortpublicstringMDN ReferenceHTMLElement.ariaSort
ariaValueMaxpublicstringMDN ReferenceHTMLElement.ariaValueMax
ariaValueMinpublicstringMDN ReferenceHTMLElement.ariaValueMin
ariaValueNowpublicstringMDN ReferenceHTMLElement.ariaValueNow
ariaValueTextpublicstringMDN ReferenceHTMLElement.ariaValueText
rolepublicstring-HTMLElement.role
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
namespaceURIreadonlystringReturns the namespace. MDN ReferenceHTMLElement.namespaceURI
onfullscreenchangepublic(this, ev) => anyMDN ReferenceHTMLElement.onfullscreenchange
onfullscreenerrorpublic(this, ev) => anyMDN ReferenceHTMLElement.onfullscreenerror
outerHTMLpublicstringMDN ReferenceHTMLElement.outerHTML
ownerDocumentreadonlyDocumentReturns the node document. Returns null for documents. MDN ReferenceHTMLElement.ownerDocument
partreadonlyDOMTokenListMDN ReferenceHTMLElement.part
prefixreadonlystringReturns the namespace prefix. MDN ReferenceHTMLElement.prefix
scrollHeightreadonlynumberMDN ReferenceHTMLElement.scrollHeight
scrollLeftpublicnumberMDN ReferenceHTMLElement.scrollLeft
scrollToppublicnumberMDN ReferenceHTMLElement.scrollTop
scrollWidthreadonlynumberMDN ReferenceHTMLElement.scrollWidth
shadowRootreadonlyShadowRootReturns element’s shadow root, if any, and if shadow root’s mode is “open”, and null otherwise. MDN ReferenceHTMLElement.shadowRoot
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
onabortpublic(this, ev) => anyFires when the user aborts the download.HTMLElement.onabort
onanimationcancelpublic(this, ev) => anyMDN ReferenceHTMLElement.onanimationcancel
onanimationendpublic(this, ev) => anyMDN ReferenceHTMLElement.onanimationend
onanimationiterationpublic(this, ev) => anyMDN ReferenceHTMLElement.onanimationiteration
onanimationstartpublic(this, ev) => anyMDN ReferenceHTMLElement.onanimationstart
onauxclickpublic(this, ev) => anyMDN ReferenceHTMLElement.onauxclick
onbeforeinputpublic(this, ev) => anyMDN ReferenceHTMLElement.onbeforeinput
onbeforetogglepublic(this, ev) => anyMDN ReferenceHTMLElement.onbeforetoggle
onblurpublic(this, ev) => anyFires when the object loses the input focus.HTMLElement.onblur
oncancelpublic(this, ev) => anyMDN ReferenceHTMLElement.oncancel
oncanplaypublic(this, ev) => anyOccurs when playback is possible, but would require further buffering.HTMLElement.oncanplay
oncanplaythroughpublic(this, ev) => anyMDN ReferenceHTMLElement.oncanplaythrough
onchangepublic(this, ev) => anyFires when the contents of the object or selection have changed.HTMLElement.onchange
onclickpublic(this, ev) => anyFires when the user clicks the left mouse button on the objectHTMLElement.onclick
onclosepublic(this, ev) => anyMDN ReferenceHTMLElement.onclose
oncontextlostpublic(this, ev) => anyMDN ReferenceHTMLElement.oncontextlost
oncontextmenupublic(this, ev) => anyFires when the user clicks the right mouse button in the client area, opening the context menu.HTMLElement.oncontextmenu
oncontextrestoredpublic(this, ev) => anyMDN ReferenceHTMLElement.oncontextrestored
oncopypublic(this, ev) => anyMDN ReferenceHTMLElement.oncopy
oncuechangepublic(this, ev) => anyMDN ReferenceHTMLElement.oncuechange
oncutpublic(this, ev) => anyMDN ReferenceHTMLElement.oncut
ondblclickpublic(this, ev) => anyFires when the user double-clicks the object.HTMLElement.ondblclick
ondragpublic(this, ev) => anyFires on the source object continuously during a drag operation.HTMLElement.ondrag
ondragendpublic(this, ev) => anyFires on the source object when the user releases the mouse at the close of a drag operation.HTMLElement.ondragend
ondragenterpublic(this, ev) => anyFires on the target element when the user drags the object to a valid drop target.HTMLElement.ondragenter
ondragleavepublic(this, ev) => anyFires on the target object when the user moves the mouse out of a valid drop target during a drag operation.HTMLElement.ondragleave
ondragoverpublic(this, ev) => anyFires on the target element continuously while the user drags the object over a valid drop target.HTMLElement.ondragover
ondragstartpublic(this, ev) => anyFires on the source object when the user starts to drag a text selection or selected object.HTMLElement.ondragstart
ondroppublic(this, ev) => anyMDN ReferenceHTMLElement.ondrop
ondurationchangepublic(this, ev) => anyOccurs when the duration attribute is updated.HTMLElement.ondurationchange
onemptiedpublic(this, ev) => anyOccurs when the media element is reset to its initial state.HTMLElement.onemptied
onendedpublic(this, ev) => anyOccurs when the end of playback is reached.HTMLElement.onended
onerrorpublicOnErrorEventHandlerNonNullFires when an error occurs during object loading. Param The event. MDN ReferenceHTMLElement.onerror
onfocuspublic(this, ev) => anyFires when the object receives focus.HTMLElement.onfocus
onformdatapublic(this, ev) => anyMDN ReferenceHTMLElement.onformdata
ongotpointercapturepublic(this, ev) => anyMDN ReferenceHTMLElement.ongotpointercapture
oninputpublic(this, ev) => anyMDN ReferenceHTMLElement.oninput
oninvalidpublic(this, ev) => anyMDN ReferenceHTMLElement.oninvalid
onkeydownpublic(this, ev) => anyFires when the user presses a key.HTMLElement.onkeydown
onkeypresspublic(this, ev) => anyFires when the user presses an alphanumeric key. Deprecated MDN ReferenceHTMLElement.onkeypress
onkeyuppublic(this, ev) => anyFires when the user releases a key.HTMLElement.onkeyup
onloadpublic(this, ev) => anyFires immediately after the browser loads the object.HTMLElement.onload
onloadeddatapublic(this, ev) => anyOccurs when media data is loaded at the current playback position.HTMLElement.onloadeddata
onloadedmetadatapublic(this, ev) => anyOccurs when the duration and dimensions of the media have been determined.HTMLElement.onloadedmetadata
onloadstartpublic(this, ev) => anyOccurs when Internet Explorer begins looking for media data.HTMLElement.onloadstart
onlostpointercapturepublic(this, ev) => anyMDN ReferenceHTMLElement.onlostpointercapture
onmousedownpublic(this, ev) => anyFires when the user clicks the object with either mouse button.HTMLElement.onmousedown
onmouseenterpublic(this, ev) => anyMDN ReferenceHTMLElement.onmouseenter
onmouseleavepublic(this, ev) => anyMDN ReferenceHTMLElement.onmouseleave
onmousemovepublic(this, ev) => anyFires when the user moves the mouse over the object.HTMLElement.onmousemove
onmouseoutpublic(this, ev) => anyFires when the user moves the mouse pointer outside the boundaries of the object.HTMLElement.onmouseout
onmouseoverpublic(this, ev) => anyFires when the user moves the mouse pointer into the object.HTMLElement.onmouseover
onmouseuppublic(this, ev) => anyFires when the user releases a mouse button while the mouse is over the object.HTMLElement.onmouseup
onpastepublic(this, ev) => anyMDN ReferenceHTMLElement.onpaste
onpausepublic(this, ev) => anyOccurs when playback is paused.HTMLElement.onpause
onplaypublic(this, ev) => anyOccurs when the play method is requested.HTMLElement.onplay
onplayingpublic(this, ev) => anyOccurs when the audio or video has started playing.HTMLElement.onplaying
onpointercancelpublic(this, ev) => anyMDN ReferenceHTMLElement.onpointercancel
onpointerdownpublic(this, ev) => anyMDN ReferenceHTMLElement.onpointerdown
onpointerenterpublic(this, ev) => anyMDN ReferenceHTMLElement.onpointerenter
onpointerleavepublic(this, ev) => anyMDN ReferenceHTMLElement.onpointerleave
onpointermovepublic(this, ev) => anyMDN ReferenceHTMLElement.onpointermove
onpointeroutpublic(this, ev) => anyMDN ReferenceHTMLElement.onpointerout
onpointeroverpublic(this, ev) => anyMDN ReferenceHTMLElement.onpointerover
onpointeruppublic(this, ev) => anyMDN ReferenceHTMLElement.onpointerup
onprogresspublic(this, ev) => anyOccurs to indicate progress while downloading media data.HTMLElement.onprogress
onratechangepublic(this, ev) => anyOccurs when the playback rate is increased or decreased.HTMLElement.onratechange
onresetpublic(this, ev) => anyFires when the user resets a form.HTMLElement.onreset
onresizepublic(this, ev) => anyMDN ReferenceHTMLElement.onresize
onscrollpublic(this, ev) => anyFires when the user repositions the scroll box in the scroll bar on the object.HTMLElement.onscroll
onscrollendpublic(this, ev) => anyMDN ReferenceHTMLElement.onscrollend
onsecuritypolicyviolationpublic(this, ev) => anyMDN ReferenceHTMLElement.onsecuritypolicyviolation
onseekedpublic(this, ev) => anyOccurs when the seek operation ends.HTMLElement.onseeked
onseekingpublic(this, ev) => anyOccurs when the current playback position is moved.HTMLElement.onseeking
onselectpublic(this, ev) => anyFires when the current selection changes.HTMLElement.onselect
onselectionchangepublic(this, ev) => anyMDN ReferenceHTMLElement.onselectionchange
onselectstartpublic(this, ev) => anyMDN ReferenceHTMLElement.onselectstart
onslotchangepublic(this, ev) => anyMDN ReferenceHTMLElement.onslotchange
onstalledpublic(this, ev) => anyOccurs when the download has stopped.HTMLElement.onstalled
onsubmitpublic(this, ev) => anyMDN ReferenceHTMLElement.onsubmit
onsuspendpublic(this, ev) => anyOccurs if the load operation has been intentionally halted.HTMLElement.onsuspend
ontimeupdatepublic(this, ev) => anyOccurs to indicate the current playback position.HTMLElement.ontimeupdate
ontogglepublic(this, ev) => anyMDN ReferenceHTMLElement.ontoggle
ontouchcancel?public(this, ev) => anyMDN ReferenceHTMLElement.ontouchcancel
ontouchend?public(this, ev) => anyMDN ReferenceHTMLElement.ontouchend
ontouchmove?public(this, ev) => anyMDN ReferenceHTMLElement.ontouchmove
ontouchstart?public(this, ev) => anyMDN ReferenceHTMLElement.ontouchstart
ontransitioncancelpublic(this, ev) => anyMDN ReferenceHTMLElement.ontransitioncancel
ontransitionendpublic(this, ev) => anyMDN ReferenceHTMLElement.ontransitionend
ontransitionrunpublic(this, ev) => anyMDN ReferenceHTMLElement.ontransitionrun
ontransitionstartpublic(this, ev) => anyMDN ReferenceHTMLElement.ontransitionstart
onvolumechangepublic(this, ev) => anyOccurs when the volume is changed, or playback is muted or unmuted.HTMLElement.onvolumechange
onwaitingpublic(this, ev) => anyOccurs when playback stops because the next frame of a video resource is not available.HTMLElement.onwaiting
onwebkitanimationendpublic(this, ev) => anyDeprecated This is a legacy alias of onanimationend. MDN ReferenceHTMLElement.onwebkitanimationend
onwebkitanimationiterationpublic(this, ev) => anyDeprecated This is a legacy alias of onanimationiteration. MDN ReferenceHTMLElement.onwebkitanimationiteration
onwebkitanimationstartpublic(this, ev) => anyDeprecated This is a legacy alias of onanimationstart. MDN ReferenceHTMLElement.onwebkitanimationstart
onwebkittransitionendpublic(this, ev) => anyDeprecated This is a legacy alias of ontransitionend. MDN ReferenceHTMLElement.onwebkittransitionend
onwheelpublic(this, ev) => anyMDN ReferenceHTMLElement.onwheel
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
offsetParentreadonlyElementMDN ReferenceHTMLElement.offsetParent
offsetTopreadonlynumberMDN ReferenceHTMLElement.offsetTop
offsetWidthreadonlynumberMDN ReferenceHTMLElement.offsetWidth
outerTextpublicstringMDN ReferenceHTMLElement.outerText
popoverpublicstringMDN ReferenceHTMLElement.popover
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
firstChildreadonlyChildNodeReturns the first child. MDN ReferenceHTMLElement.firstChild
isConnectedreadonlybooleanReturns true if node is connected and false otherwise. MDN ReferenceHTMLElement.isConnected
lastChildreadonlyChildNodeReturns the last child. MDN ReferenceHTMLElement.lastChild
nextSiblingreadonlyChildNodeReturns the next sibling. MDN ReferenceHTMLElement.nextSibling
nodeNamereadonlystringReturns a string appropriate for the type of node. MDN ReferenceHTMLElement.nodeName
nodeTypereadonlynumberReturns the type of node. MDN ReferenceHTMLElement.nodeType
nodeValuepublicstringMDN ReferenceHTMLElement.nodeValue
parentElementreadonlyHTMLElementReturns the parent element. MDN ReferenceHTMLElement.parentElement
parentNodereadonlyParentNodeReturns the parent. MDN ReferenceHTMLElement.parentNode
previousSiblingreadonlyChildNodeReturns the previous sibling. MDN ReferenceHTMLElement.previousSibling
textContentpublicstringMDN ReferenceHTMLElement.textContent
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
nextElementSiblingreadonlyElementReturns the first following sibling that is an element, and null otherwise. MDN ReferenceHTMLElement.nextElementSibling
previousElementSiblingreadonlyElementReturns the first preceding sibling that is an element, and null otherwise. MDN ReferenceHTMLElement.previousElementSibling
childElementCountreadonlynumberMDN ReferenceHTMLElement.childElementCount
childrenreadonlyHTMLCollectionReturns the child elements. MDN ReferenceHTMLElement.children
firstElementChildreadonlyElementReturns the first child that is an element, and null otherwise. MDN ReferenceHTMLElement.firstElementChild
lastElementChildreadonlyElementReturns the last child that is an element, and null otherwise. MDN ReferenceHTMLElement.lastElementChild
assignedSlotreadonlyHTMLSlotElementMDN ReferenceHTMLElement.assignedSlot