Interface: ShadowRootWithComposedRanges
lexical.ShadowRootWithComposedRanges
Extended ShadowRoot interface that includes the modern getComposedRanges() method. This API is available in Chrome 125+, Firefox 132+, and other modern browsers. Provides a standardized way to get selection ranges across shadow DOM boundaries.
Hierarchy
-
ShadowRoot↳
ShadowRootWithComposedRanges
Properties
ATTRIBUTE_NODE
• Readonly ATTRIBUTE_NODE: 2
Inherited from
ShadowRoot.ATTRIBUTE_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16315
CDATA_SECTION_NODE
• Readonly CDATA_SECTION_NODE: 4
node is a CDATASection node.
Inherited from
ShadowRoot.CDATA_SECTION_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16319
COMMENT_NODE
• Readonly COMMENT_NODE: 8
node is a Comment node.
Inherited from
ShadowRoot.COMMENT_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16325
DOCUMENT_FRAGMENT_NODE
• Readonly DOCUMENT_FRAGMENT_NODE: 11
node is a DocumentFragment node.
Inherited from
ShadowRoot.DOCUMENT_FRAGMENT_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16331
DOCUMENT_NODE
• Readonly DOCUMENT_NODE: 9
node is a document.
Inherited from
ShadowRoot.DOCUMENT_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16327
DOCUMENT_POSITION_CONTAINED_BY
• Readonly DOCUMENT_POSITION_CONTAINED_BY: 16
Set when other is a descendant of node.
Inherited from
ShadowRoot.DOCUMENT_POSITION_CONTAINED_BY
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16342
DOCUMENT_POSITION_CONTAINS
• Readonly DOCUMENT_POSITION_CONTAINS: 8
Set when other is an ancestor of node.
Inherited from
ShadowRoot.DOCUMENT_POSITION_CONTAINS
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16340
DOCUMENT_POSITION_DISCONNECTED
• Readonly DOCUMENT_POSITION_DISCONNECTED: 1
Set when node and other are not in the same tree.
Inherited from
ShadowRoot.DOCUMENT_POSITION_DISCONNECTED
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16334
DOCUMENT_POSITION_FOLLOWING
• Readonly DOCUMENT_POSITION_FOLLOWING: 4
Set when other is following node.
Inherited from
ShadowRoot.DOCUMENT_POSITION_FOLLOWING
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16338
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
• Readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32
Inherited from
ShadowRoot.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16343
DOCUMENT_POSITION_PRECEDING
• Readonly DOCUMENT_POSITION_PRECEDING: 2
Set when other is preceding node.
Inherited from
ShadowRoot.DOCUMENT_POSITION_PRECEDING
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16336
DOCUMENT_TYPE_NODE
• Readonly DOCUMENT_TYPE_NODE: 10
node is a doctype.
Inherited from
ShadowRoot.DOCUMENT_TYPE_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16329
ELEMENT_NODE
• Readonly ELEMENT_NODE: 1
node is an element.
Inherited from
ShadowRoot.ELEMENT_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16314
ENTITY_NODE
• Readonly ENTITY_NODE: 6
Inherited from
ShadowRoot.ENTITY_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16321
ENTITY_REFERENCE_NODE
• Readonly ENTITY_REFERENCE_NODE: 5
Inherited from
ShadowRoot.ENTITY_REFERENCE_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16320
NOTATION_NODE
• Readonly NOTATION_NODE: 12
Inherited from
ShadowRoot.NOTATION_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16332
PROCESSING_INSTRUCTION_NODE
• Readonly PROCESSING_INSTRUCTION_NODE: 7
node is a ProcessingInstruction node.
Inherited from
ShadowRoot.PROCESSING_INSTRUCTION_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16323
TEXT_NODE
• Readonly TEXT_NODE: 3
node is a Text node.
Inherited from
ShadowRoot.TEXT_NODE
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16317
activeElement
• Readonly activeElement: null | Element
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.
Inherited from
ShadowRoot.activeElement
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7449
adoptedStyleSheets
• adoptedStyleSheets: CSSStyleSheet[]
Inherited from
ShadowRoot.adoptedStyleSheets
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7451
baseURI
• Readonly baseURI: string
Returns node's node document's document base URL.
Inherited from
ShadowRoot.baseURI
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16184
childElementCount
• Readonly childElementCount: number
Inherited from
ShadowRoot.childElementCount
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16877
childNodes
• Readonly childNodes: NodeListOf<ChildNode>
Returns the children.
Inherited from
ShadowRoot.childNodes
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16190
children
• Readonly children: HTMLCollection
Returns the child elements.
Inherited from
ShadowRoot.children
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16883
delegatesFocus
• Readonly delegatesFocus: boolean
Inherited from
ShadowRoot.delegatesFocus
Defined in
node_modules/typescript/lib/lib.dom.d.ts:21396
firstChild
• Readonly firstChild: null | ChildNode
Returns the first child.
Inherited from
ShadowRoot.firstChild
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16196
firstElementChild
• Readonly firstElementChild: null | Element
Returns the first child that is an element, and null otherwise.
Inherited from
ShadowRoot.firstElementChild
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16889
fullscreenElement
• Readonly fullscreenElement: null | Element
Returns document's fullscreen element.
Inherited from
ShadowRoot.fullscreenElement
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7457
host
• Readonly host: Element
Inherited from
ShadowRoot.host
Defined in
node_modules/typescript/lib/lib.dom.d.ts:21398
innerHTML
• innerHTML: string
Inherited from
ShadowRoot.innerHTML
Defined in
node_modules/typescript/lib/lib.dom.d.ts:14381
isConnected
• Readonly isConnected: boolean
Returns true if node is connected and false otherwise.
Inherited from
ShadowRoot.isConnected
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16202
lastChild
• Readonly lastChild: null | ChildNode
Returns the last child.
Inherited from
ShadowRoot.lastChild
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16208
lastElementChild
• Readonly lastElementChild: null | Element
Returns the last child that is an element, and null otherwise.
Inherited from
ShadowRoot.lastElementChild
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16895
mode
• Readonly mode: ShadowRootMode
Inherited from
ShadowRoot.mode
Defined in
node_modules/typescript/lib/lib.dom.d.ts:21400
nextSibling
• Readonly nextSibling: null | ChildNode
Returns the next sibling.
Inherited from
ShadowRoot.nextSibling
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16214
nodeName
• Readonly nodeName: string
Returns a string appropriate for the type of node.
Inherited from
ShadowRoot.nodeName
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16220
nodeType
• Readonly nodeType: number
Returns the type of node.
Inherited from
ShadowRoot.nodeType
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16226
nodeValue
• nodeValue: null | string
Inherited from
ShadowRoot.nodeValue
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16228
onslotchange
• onslotchange: null | (this: ShadowRoot, ev: Event) => any
Inherited from
ShadowRoot.onslotchange
Defined in
node_modules/typescript/lib/lib.dom.d.ts:21401
ownerDocument
• Readonly ownerDocument: Document
Inherited from
ShadowRoot.ownerDocument
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7430
parentElement
• Readonly parentElement: null | HTMLElement
Returns the parent element.
Inherited from
ShadowRoot.parentElement
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16240
parentNode
• Readonly parentNode: null | ParentNode
Returns the parent.
Inherited from
ShadowRoot.parentNode
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16246
pictureInPictureElement
• Readonly pictureInPictureElement: null | Element
Inherited from
ShadowRoot.pictureInPictureElement
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7459
pointerLockElement
• Readonly pointerLockElement: null | Element
Inherited from
ShadowRoot.pointerLockElement
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7461
previousSibling
• Readonly previousSibling: null | ChildNode
Returns the previous sibling.
Inherited from
ShadowRoot.previousSibling
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16252
slotAssignment
• Readonly slotAssignment: SlotAssignmentMode
Inherited from
ShadowRoot.slotAssignment
Defined in
node_modules/typescript/lib/lib.dom.d.ts:21403
styleSheets
• Readonly styleSheets: StyleSheetList
Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
Inherited from
ShadowRoot.styleSheets
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7467
textContent
• textContent: null | string
Inherited from
ShadowRoot.textContent
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16254
Methods
addEventListener
▸ addEventListener<K>(type, listener, options?): void
Throws a "NotSupportedError" DOMException if context object is a shadow root.
Type parameters
| Name | Type |
|---|---|
K | extends "slotchange" |
Parameters
| Name | Type |
|---|---|
type | K |
listener | (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any |
options? | boolean | AddEventListenerOptions |
Returns
void
Inherited from
ShadowRoot.addEventListener
Defined in
node_modules/typescript/lib/lib.dom.d.ts:21405
▸ addEventListener(type, listener, options?): void
Parameters
| Name | Type |
|---|---|
type | string |
listener | EventListenerOrEventListenerObject |
options? | boolean | AddEventListenerOptions |
Returns
void
Inherited from
ShadowRoot.addEventListener
Defined in
node_modules/typescript/lib/lib.dom.d.ts:21406
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.
Parameters
| Name | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
ShadowRoot.append
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16903
appendChild
▸ appendChild<T>(node): T
Type parameters
| Name | Type |
|---|---|
T | extends Node |
Parameters
| Name | Type |
|---|---|
node | T |
Returns
T
Inherited from
ShadowRoot.appendChild
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16256
cloneNode
▸ cloneNode(deep?): Node
Returns a copy of node. If deep is true, the copy also includes the node's descendants.
Parameters
| Name | Type |
|---|---|
deep? | boolean |
Returns
Node
Inherited from
ShadowRoot.cloneNode
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16262
compareDocumentPosition
▸ compareDocumentPosition(other): number
Returns a bitmask indicating the position of other relative to node.
Parameters
| Name | Type |
|---|---|
other | Node |
Returns
number
Inherited from
ShadowRoot.compareDocumentPosition
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16268
contains
▸ contains(other): boolean
Returns true if other is an inclusive descendant of node, and false otherwise.
Parameters
| Name | Type |
|---|---|
other | null | Node |
Returns
boolean
Inherited from
ShadowRoot.contains
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16274
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.
Parameters
| Name | Type |
|---|---|
event | Event |
Returns
boolean
Inherited from
ShadowRoot.dispatchEvent
Defined in
node_modules/typescript/lib/lib.dom.d.ts:8262
elementFromPoint
▸ elementFromPoint(x, y): null | Element
Returns the element for the specified x coordinate and the specified y coordinate.
Parameters
| Name | Type | Description |
|---|---|---|
x | number | The x-offset |
y | number | The y-offset |
Returns
null | Element
Inherited from
ShadowRoot.elementFromPoint
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7473
elementsFromPoint
▸ elementsFromPoint(x, y): Element[]
Parameters
| Name | Type |
|---|---|
x | number |
y | number |
Returns
Element[]
Inherited from
ShadowRoot.elementsFromPoint
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7474
getAnimations
▸ getAnimations(): Animation[]
Returns
Animation[]
Inherited from
ShadowRoot.getAnimations
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7476
getComposedRanges
▸ getComposedRanges(options?): StaticRange[]
Returns an array of StaticRange objects representing the current selection across shadow DOM boundaries. This is the modern replacement for the experimental ShadowRoot.getSelection() method.
Parameters
| Name | Type | Description |
|---|---|---|
options? | GetComposedRangesOptions | Configuration options for the composed ranges |
Returns
StaticRange[]
Array of StaticRange objects representing the selection
Defined in
packages/lexical/src/LexicalConstants.ts:45
getElementById
▸ getElementById(elementId): null | HTMLElement
Parameters
| Name | Type |
|---|---|
elementId | string |
Returns
null | HTMLElement
Inherited from
ShadowRoot.getElementById
Defined in
node_modules/typescript/lib/lib.dom.d.ts:7431
getRootNode
▸ getRootNode(options?): Node
Returns node's root.
Parameters
| Name | Type |
|---|---|
options? | GetRootNodeOptions |
Returns
Node
Inherited from
ShadowRoot.getRootNode
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16280
hasChildNodes
▸ hasChildNodes(): boolean
Returns whether node has children.
Returns
boolean
Inherited from
ShadowRoot.hasChildNodes
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16286
insertBefore
▸ insertBefore<T>(node, child): T
Type parameters
| Name | Type |
|---|---|
T | extends Node |
Parameters
| Name | Type |
|---|---|
node | T |
child | null | Node |
Returns
T
Inherited from
ShadowRoot.insertBefore
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16288
isDefaultNamespace
▸ isDefaultNamespace(namespace): boolean
Parameters
| Name | Type |
|---|---|
namespace | null | string |
Returns
boolean
Inherited from
ShadowRoot.isDefaultNamespace
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16290
isEqualNode
▸ isEqualNode(otherNode): boolean
Returns whether node and otherNode have the same properties.
Parameters
| Name | Type |
|---|---|
otherNode | null | Node |
Returns
boolean
Inherited from
ShadowRoot.isEqualNode
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16296
isSameNode
▸ isSameNode(otherNode): boolean
Parameters
| Name | Type |
|---|---|
otherNode | null | Node |
Returns
boolean
Inherited from
ShadowRoot.isSameNode
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16298
lookupNamespaceURI
▸ lookupNamespaceURI(prefix): null | string
Parameters
| Name | Type |
|---|---|
prefix | null | string |
Returns
null | string
Inherited from
ShadowRoot.lookupNamespaceURI
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16300
lookupPrefix
▸ lookupPrefix(namespace): null | string
Parameters
| Name | Type |
|---|---|
namespace | null | string |
Returns
null | string
Inherited from
ShadowRoot.lookupPrefix
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16302
normalize
▸ normalize(): void
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
Returns
void
Inherited from
ShadowRoot.normalize
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16308
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.
Parameters
| Name | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
ShadowRoot.prepend
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16911
querySelector
▸ querySelector<K>(selectors): null | HTMLElementTagNameMap[K]
Returns the first element that is a descendant of node that matches selectors.
Type parameters
| Name | Type |
|---|---|
K | extends keyof HTMLElementTagNameMap |
Parameters
| Name | Type |
|---|---|
selectors | K |
Returns
null | HTMLElementTagNameMap[K]
Inherited from
ShadowRoot.querySelector
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16917
▸ querySelector<K>(selectors): null | SVGElementTagNameMap[K]
Type parameters
| Name | Type |
|---|---|
K | extends keyof SVGElementTagNameMap |
Parameters
| Name | Type |
|---|---|
selectors | K |
Returns
null | SVGElementTagNameMap[K]
Inherited from
ShadowRoot.querySelector
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16918
▸ querySelector<K>(selectors): null | MathMLElementTagNameMap[K]
Type parameters
| Name | Type |
|---|---|
K | extends keyof MathMLElementTagNameMap |
Parameters
| Name | Type |
|---|---|
selectors | K |
Returns
null | MathMLElementTagNameMap[K]
Inherited from
ShadowRoot.querySelector
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16919
▸ querySelector<K>(selectors): null | HTMLElementDeprecatedTagNameMap[K]
Type parameters
| Name | Type |
|---|---|
K | extends keyof HTMLElementDeprecatedTagNameMap |
Parameters
| Name | Type |
|---|---|
selectors | K |
Returns
null | HTMLElementDeprecatedTagNameMap[K]
Deprecated
Inherited from
ShadowRoot.querySelector
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16921
▸ querySelector<E>(selectors): null | E
Type parameters
| Name | Type |
|---|---|
E | extends Element = Element |
Parameters
| Name | Type |
|---|---|
selectors | string |
Returns
null | E
Inherited from
ShadowRoot.querySelector
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16922
querySelectorAll
▸ querySelectorAll<K>(selectors): NodeListOf<HTMLElementTagNameMap[K]>
Returns all element descendants of node that match selectors.
Type parameters
| Name | Type |
|---|---|
K | extends keyof HTMLElementTagNameMap |
Parameters
| Name | Type |
|---|---|
selectors | K |
Returns
NodeListOf<HTMLElementTagNameMap[K]>
Inherited from
ShadowRoot.querySelectorAll
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16928
▸ querySelectorAll<K>(selectors): NodeListOf<SVGElementTagNameMap[K]>
Type parameters
| Name | Type |
|---|---|
K | extends keyof SVGElementTagNameMap |
Parameters
| Name | Type |
|---|---|
selectors | K |
Returns
NodeListOf<SVGElementTagNameMap[K]>
Inherited from
ShadowRoot.querySelectorAll
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16929
▸ querySelectorAll<K>(selectors): NodeListOf<MathMLElementTagNameMap[K]>
Type parameters
| Name | Type |
|---|---|
K | extends keyof MathMLElementTagNameMap |
Parameters
| Name | Type |
|---|---|
selectors | K |
Returns
NodeListOf<MathMLElementTagNameMap[K]>
Inherited from
ShadowRoot.querySelectorAll
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16930
▸ querySelectorAll<K>(selectors): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>
Type parameters
| Name | Type |
|---|---|
K | extends keyof HTMLElementDeprecatedTagNameMap |
Parameters
| Name | Type |
|---|---|
selectors | K |
Returns
NodeListOf<HTMLElementDeprecatedTagNameMap[K]>
Deprecated
Inherited from
ShadowRoot.querySelectorAll
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16932
▸ querySelectorAll<E>(selectors): NodeListOf<E>
Type parameters
| Name | Type |
|---|---|
E | extends Element = Element |
Parameters
| Name | Type |
|---|---|
selectors | string |
Returns
NodeListOf<E>
Inherited from
ShadowRoot.querySelectorAll
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16933
removeChild
▸ removeChild<T>(child): T
Type parameters
| Name | Type |
|---|---|
T | extends Node |
Parameters
| Name | Type |
|---|---|
child | T |
Returns
T
Inherited from
ShadowRoot.removeChild
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16310
removeEventListener
▸ removeEventListener<K>(type, listener, options?): void
Type parameters
| Name | Type |
|---|---|
K | extends "slotchange" |
Parameters
| Name | Type |
|---|---|
type | K |
listener | (this: ShadowRoot, ev: ShadowRootEventMap[K]) => any |
options? | boolean | EventListenerOptions |
Returns
void
Inherited from
ShadowRoot.removeEventListener
Defined in
node_modules/typescript/lib/lib.dom.d.ts:21407
▸ removeEventListener(type, listener, options?): void
Parameters
| Name | Type |
|---|---|
type | string |
listener | EventListenerOrEventListenerObject |
options? | boolean | EventListenerOptions |
Returns
void
Inherited from
ShadowRoot.removeEventListener
Defined in
node_modules/typescript/lib/lib.dom.d.ts:21408
replaceChild
▸ replaceChild<T>(node, child): T
Type parameters
| Name | Type |
|---|---|
T | extends Node |
Parameters
| Name | Type |
|---|---|
node | Node |
child | T |
Returns
T
Inherited from
ShadowRoot.replaceChild
Defined in
node_modules/typescript/lib/lib.dom.d.ts:16312
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.
Parameters
| Name | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
ShadowRoot.replaceChildren