---
title: "Node | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface Node

The DOM **`Node`** interface is an abstract base class upon which many other DOM API objects are based, thus letting those object types be used similarly and often interchangeably. As an abstract class, there is no such thing as a plain Node object. All objects that implement Node functionality are based on one of its subclasses. Most notable are Document, Element, and DocumentFragment.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node)

interface Node {  
    [ATTRIBUTE\_NODE](#attribute_node): 2;  
    [baseURI](#baseuri): string;  
    [CDATA\_SECTION\_NODE](#cdata_section_node): 4;  
    [childNodes](#childnodes): [NodeListOf](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.NodeListOf/)<[ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/)\>;  
    [COMMENT\_NODE](#comment_node): 8;  
    [DOCUMENT\_FRAGMENT\_NODE](#document_fragment_node): 11;  
    [DOCUMENT\_NODE](#document_node): 9;  
    [DOCUMENT\_POSITION\_CONTAINED\_BY](#document_position_contained_by): 16;  
    [DOCUMENT\_POSITION\_CONTAINS](#document_position_contains): 8;  
    [DOCUMENT\_POSITION\_DISCONNECTED](#document_position_disconnected): 1;  
    [DOCUMENT\_POSITION\_FOLLOWING](#document_position_following): 4;  
    [DOCUMENT\_POSITION\_IMPLEMENTATION\_SPECIFIC](#document_position_implementation_specific): 32;  
    [DOCUMENT\_POSITION\_PRECEDING](#document_position_preceding): 2;  
    [DOCUMENT\_TYPE\_NODE](#document_type_node): 10;  
    [ELEMENT\_NODE](#element_node): 1;  
    [ENTITY\_NODE](#entity_node): 6;  
    [ENTITY\_REFERENCE\_NODE](#entity_reference_node): 5;  
    [firstChild](#firstchild): [ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/) | null;  
    [isConnected](#isconnected): boolean;  
    [lastChild](#lastchild): [ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/) | null;  
    [nextSibling](#nextsibling): [ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/) | null;  
    [nodeName](#nodename): string;  
    [nodeType](#nodetype): number;  
    [nodeValue](#nodevalue): string | null;  
    [NOTATION\_NODE](#notation_node): 12;  
    [ownerDocument](#ownerdocument): [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/) | null;  
    [parentElement](#parentelement): [HTMLElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLElement/) | null;  
    [parentNode](#parentnode): [ParentNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ParentNode/) | null;  
    [previousSibling](#previoussibling): [ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/) | null;  
    [PROCESSING\_INSTRUCTION\_NODE](#processing_instruction_node): 7;  
    [TEXT\_NODE](#text_node): 3;  
    [textContent](#textcontent): string | null;  
    [addEventListener](#addeventlistener-1)(  
        type: string,  
        callback: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/) | null,  
        options?: boolean | AddEventListenerOptions,  
    ): void;  
    [appendChild](#appendchild-1)<[T](#appendchildt) extends Node\>(node: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#appendchildt)): [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#appendchildt);  
    [cloneNode](#clonenode-1)(subtree?: boolean): Node;  
    [compareDocumentPosition](#comparedocumentposition-1)(other: Node): number;  
    [contains](#contains-1)(other: Node | null): boolean;  
    [dispatchEvent](#dispatchevent-1)(event: Event): boolean;  
    [getRootNode](#getrootnode-1)(options?: [GetRootNodeOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GetRootNodeOptions/)): Node;  
    [hasChildNodes](#haschildnodes-1)(): boolean;  
    [insertBefore](#insertbefore-1)<[T](#insertbeforet) extends Node\>(node: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#insertbeforet), child: Node | null): [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#insertbeforet);  
    [isDefaultNamespace](#isdefaultnamespace-1)(namespace: string | null): boolean;  
    [isEqualNode](#isequalnode-1)(otherNode: Node | null): boolean;  
    [isSameNode](#issamenode-1)(otherNode: Node | null): boolean;  
    [lookupNamespaceURI](#lookupnamespaceuri-1)(prefix: string | null): string | null;  
    [lookupPrefix](#lookupprefix-1)(namespace: string | null): string | null;  
    [normalize](#normalize-1)(): void;  
    [removeChild](#removechild-1)<[T](#removechildt) extends Node\>(child: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#removechildt)): [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#removechildt);  
    [removeEventListener](#removeeventlistener-1)(  
        type: string,  
        callback: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/) | null,  
        options?: boolean | EventListenerOptions,  
    ): void;  
    [replaceChild](#replacechild-1)<[T](#replacechildt) extends Node\>(node: Node, child: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#replacechildt)): [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#replacechildt);  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.Node))

-   EventTarget
    -   Node
        -   [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/)
        -   [Element](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Element/)
        -   [Attr](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Attr/)
        -   [ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/)
        -   [ParentNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ParentNode/)
        -   [DocumentType](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DocumentType/)
        -   [DocumentFragment](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.DocumentFragment/)
        -   [CharacterData](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CharacterData/)

##### Index

### Properties[](#properties)

[ATTRIBUTE\_NODE](#attribute_node) [baseURI](#baseuri) [CDATA\_SECTION\_NODE](#cdata_section_node) [childNodes](#childnodes) [COMMENT\_NODE](#comment_node) [DOCUMENT\_FRAGMENT\_NODE](#document_fragment_node) [DOCUMENT\_NODE](#document_node) [DOCUMENT\_POSITION\_CONTAINED\_BY](#document_position_contained_by) [DOCUMENT\_POSITION\_CONTAINS](#document_position_contains) [DOCUMENT\_POSITION\_DISCONNECTED](#document_position_disconnected) [DOCUMENT\_POSITION\_FOLLOWING](#document_position_following) [DOCUMENT\_POSITION\_IMPLEMENTATION\_SPECIFIC](#document_position_implementation_specific) [DOCUMENT\_POSITION\_PRECEDING](#document_position_preceding) [DOCUMENT\_TYPE\_NODE](#document_type_node) [ELEMENT\_NODE](#element_node) [ENTITY\_NODE](#entity_node) [ENTITY\_REFERENCE\_NODE](#entity_reference_node) [firstChild](#firstchild) [isConnected](#isconnected) [lastChild](#lastchild) [nextSibling](#nextsibling) [nodeName](#nodename) [nodeType](#nodetype) [nodeValue](#nodevalue) [NOTATION\_NODE](#notation_node) [ownerDocument](#ownerdocument) [parentElement](#parentelement) [parentNode](#parentnode) [previousSibling](#previoussibling) [PROCESSING\_INSTRUCTION\_NODE](#processing_instruction_node) [TEXT\_NODE](#text_node) [textContent](#textcontent)

### Methods[](#methods)

[addEventListener](#addeventlistener) [appendChild](#appendchild) [cloneNode](#clonenode) [compareDocumentPosition](#comparedocumentposition) [contains](#contains) [dispatchEvent](#dispatchevent) [getRootNode](#getrootnode) [hasChildNodes](#haschildnodes) [insertBefore](#insertbefore) [isDefaultNamespace](#isdefaultnamespace) [isEqualNode](#isequalnode) [isSameNode](#issamenode) [lookupNamespaceURI](#lookupnamespaceuri) [lookupPrefix](#lookupprefix) [normalize](#normalize) [removeChild](#removechild) [removeEventListener](#removeeventlistener) [replaceChild](#replacechild)

## Properties[](#properties-1)

### `Readonly`ATTRIBUTE\_NODE[](#attribute_node)

ATTRIBUTE\_NODE: 2

### `Readonly`baseURI[](#baseuri)

baseURI: string

The read-only **`baseURI`** property of the Node interface returns the absolute base URL of the document containing the node.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/baseURI)

### `Readonly`CDATA\_SECTION\_NODE[](#cdata_section_node)

CDATA\_SECTION\_NODE: 4

node is a CDATASection node.

### `Readonly`childNodes[](#childnodes)

childNodes: [NodeListOf](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.NodeListOf/)<[ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/)\>

The read-only **`childNodes`** property of the Node interface returns a live NodeList of child nodes of the given element where the first child node is assigned index 0. Child nodes include elements, text and comments.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/childNodes)

### `Readonly`COMMENT\_NODE[](#comment_node)

COMMENT\_NODE: 8

node is a Comment node.

### `Readonly`DOCUMENT\_FRAGMENT\_NODE[](#document_fragment_node)

DOCUMENT\_FRAGMENT\_NODE: 11

node is a DocumentFragment node.

### `Readonly`DOCUMENT\_NODE[](#document_node)

DOCUMENT\_NODE: 9

node is a document.

### `Readonly`DOCUMENT\_POSITION\_CONTAINED\_BY[](#document_position_contained_by)

DOCUMENT\_POSITION\_CONTAINED\_BY: 16

Set when other is a descendant of node.

### `Readonly`DOCUMENT\_POSITION\_CONTAINS[](#document_position_contains)

DOCUMENT\_POSITION\_CONTAINS: 8

Set when other is an ancestor of node.

### `Readonly`DOCUMENT\_POSITION\_DISCONNECTED[](#document_position_disconnected)

DOCUMENT\_POSITION\_DISCONNECTED: 1

Set when node and other are not in the same tree.

### `Readonly`DOCUMENT\_POSITION\_FOLLOWING[](#document_position_following)

DOCUMENT\_POSITION\_FOLLOWING: 4

Set when other is following node.

### `Readonly`DOCUMENT\_POSITION\_IMPLEMENTATION\_SPECIFIC[](#document_position_implementation_specific)

DOCUMENT\_POSITION\_IMPLEMENTATION\_SPECIFIC: 32

### `Readonly`DOCUMENT\_POSITION\_PRECEDING[](#document_position_preceding)

DOCUMENT\_POSITION\_PRECEDING: 2

Set when other is preceding node.

### `Readonly`DOCUMENT\_TYPE\_NODE[](#document_type_node)

DOCUMENT\_TYPE\_NODE: 10

node is a doctype.

### `Readonly`ELEMENT\_NODE[](#element_node)

ELEMENT\_NODE: 1

node is an element.

### `Readonly`ENTITY\_NODE[](#entity_node)

ENTITY\_NODE: 6

### `Readonly`ENTITY\_REFERENCE\_NODE[](#entity_reference_node)

ENTITY\_REFERENCE\_NODE: 5

### `Readonly`firstChild[](#firstchild)

firstChild: [ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/) | null

The read-only **`firstChild`** property of the Node interface returns the node's first child in the tree, or null if the node has no children.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/firstChild)

### `Readonly`isConnected[](#isconnected)

isConnected: boolean

The read-only **`isConnected`** property of the Node interface returns a boolean indicating whether the node is connected (directly or indirectly) to a Document object.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/isConnected)

### `Readonly`lastChild[](#lastchild)

lastChild: [ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/) | null

The read-only **`lastChild`** property of the Node interface returns the last child of the node, or null if there are no child nodes.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lastChild)

### `Readonly`nextSibling[](#nextsibling)

nextSibling: [ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/) | null

The read-only **`nextSibling`** property of the Node interface returns the node immediately following the specified one in their parent's childNodes, or returns null if the specified node is the last child in the parent element.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nextSibling)

### `Readonly`nodeName[](#nodename)

nodeName: string

The read-only **`nodeName`** property of Node returns the name of the current node as a string.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeName)

### `Readonly`nodeType[](#nodetype)

nodeType: number

The read-only **`nodeType`** property of a Node interface is an integer that identifies what the node is. It distinguishes different kinds of nodes from each other, such as elements, text, and comments.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeType)

### nodeValue[](#nodevalue)

nodeValue: string | null

The **`nodeValue`** property of the Node interface returns or sets the value of the current node.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nodeValue)

### `Readonly`NOTATION\_NODE[](#notation_node)

NOTATION\_NODE: 12

### `Readonly`ownerDocument[](#ownerdocument)

ownerDocument: [Document](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Document/) | null

The read-only **`ownerDocument`** property of the Node interface returns the top-level document object of the node.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/ownerDocument)

### `Readonly`parentElement[](#parentelement)

parentElement: [HTMLElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLElement/) | null

The read-only **`parentElement`** property of Node interface returns the DOM node's parent Element, or null if the node either has no parent, or its parent isn't a DOM Element. Node.parentNode on the other hand returns any kind of parent, regardless of its type.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentElement)

### `Readonly`parentNode[](#parentnode)

parentNode: [ParentNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ParentNode/) | null

The read-only **`parentNode`** property of the Node interface returns the parent of the specified node in the DOM tree.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentNode)

### `Readonly`previousSibling[](#previoussibling)

previousSibling: [ChildNode](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ChildNode/) | null

The read-only **`previousSibling`** property of the Node interface returns the node immediately preceding the specified one in its parent's childNodes list, or null if the specified node is the first in that list.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/previousSibling)

### `Readonly`PROCESSING\_INSTRUCTION\_NODE[](#processing_instruction_node)

PROCESSING\_INSTRUCTION\_NODE: 7

node is a ProcessingInstruction node.

### `Readonly`TEXT\_NODE[](#text_node)

TEXT\_NODE: 3

node is a Text node.

### textContent[](#textcontent)

textContent: string | null

The **`textContent`** property of the Node interface represents the text content of the node and its descendants.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/textContent)

## Methods[](#methods-1)

### addEventListener[](#addeventlistener)

-   addEventListener(  
        type: string,  
        callback: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/) | null,  
        options?: boolean | AddEventListenerOptions,  
    ): void[](#addeventlistener-1)
    
    The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
    
    #### Parameters
    
    -   type: string
    -   callback: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/) | null
    -   `Optional`options: boolean | AddEventListenerOptions
    
    #### Returns void
    
    Inherited from EventTarget.addEventListener
    

### appendChild[](#appendchild)

-   appendChild<[T](#appendchildt) extends Node\>(node: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#appendchildt)): [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#appendchildt)[](#appendchild-1)
    
    The **`appendChild()`** method of the Node interface adds a node to the end of the list of children of a specified parent node.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/appendChild)
    
    #### Type Parameters
    
    -   T extends Node
    
    #### Parameters
    
    -   node: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#appendchildt)
    
    #### Returns [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#appendchildt)
    

### cloneNode[](#clonenode)

-   cloneNode(subtree?: boolean): Node[](#clonenode-1)
    
    The **`cloneNode()`** method of the Node interface returns a duplicate of the node on which this method was called. Its parameter controls if the subtree contained in the node is also cloned or not.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/cloneNode)
    
    #### Parameters
    
    -   `Optional`subtree: boolean
    
    #### Returns Node
    

### compareDocumentPosition[](#comparedocumentposition)

-   compareDocumentPosition(other: Node): number[](#comparedocumentposition-1)
    
    The **`compareDocumentPosition()`** method of the Node interface reports the position of its argument node relative to the node on which it is called.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/compareDocumentPosition)
    
    #### Parameters
    
    -   other: Node
    
    #### Returns number
    

### contains[](#contains)

-   contains(other: Node | null): boolean[](#contains-1)
    
    The **`contains()`** method of the Node interface returns a boolean value indicating whether a node is a descendant of a given node, that is the node itself, one of its direct children (childNodes), one of the children's direct children, and so on.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/contains)
    
    #### Parameters
    
    -   other: Node | null
    
    #### Returns boolean
    

### dispatchEvent[](#dispatchevent)

-   dispatchEvent(event: Event): boolean[](#dispatchevent-1)
    
    The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
    
    #### Parameters
    
    -   event: Event
    
    #### Returns boolean
    
    Inherited from EventTarget.dispatchEvent
    

### getRootNode[](#getrootnode)

-   getRootNode(options?: [GetRootNodeOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GetRootNodeOptions/)): Node[](#getrootnode-1)
    
    The **`getRootNode()`** method of the Node interface returns the context object's root, which optionally includes the shadow root if it is available.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/getRootNode)
    
    #### Parameters
    
    -   `Optional`options: [GetRootNodeOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.GetRootNodeOptions/)
    
    #### Returns Node
    

### hasChildNodes[](#haschildnodes)

-   hasChildNodes(): boolean[](#haschildnodes-1)
    
    The **`hasChildNodes()`** method of the Node interface returns a boolean value indicating whether the given Node has child nodes or not.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/hasChildNodes)
    
    #### Returns boolean
    

### insertBefore[](#insertbefore)

-   insertBefore<[T](#insertbeforet) extends Node\>(node: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#insertbeforet), child: Node | null): [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#insertbeforet)[](#insertbefore-1)
    
    The **`insertBefore()`** method of the Node interface inserts a node before a reference node as a child of a specified parent node.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/insertBefore)
    
    #### Type Parameters
    
    -   T extends Node
    
    #### Parameters
    
    -   node: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#insertbeforet)
    -   child: Node | null
    
    #### Returns [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#insertbeforet)
    

### isDefaultNamespace[](#isdefaultnamespace)

-   isDefaultNamespace(namespace: string | null): boolean[](#isdefaultnamespace-1)
    
    The **`isDefaultNamespace()`** method of the Node interface accepts a namespace URI as an argument. It returns a boolean value that is true if the namespace is the default namespace on the given node and false if not. The default namespace can be retrieved with Node.lookupNamespaceURI() by passing null as the argument.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/isDefaultNamespace)
    
    #### Parameters
    
    -   namespace: string | null
    
    #### Returns boolean
    

### isEqualNode[](#isequalnode)

-   isEqualNode(otherNode: Node | null): boolean[](#isequalnode-1)
    
    The **`isEqualNode()`** method of the Node interface tests whether two nodes are equal. Two nodes are equal when they have the same type, defining characteristics (for elements, this would be their ID, number of children, and so forth), its attributes match, and so on. The specific set of data points that must match varies depending on the types of the nodes.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/isEqualNode)
    
    #### Parameters
    
    -   otherNode: Node | null
    
    #### Returns boolean
    

### isSameNode[](#issamenode)

-   isSameNode(otherNode: Node | null): boolean[](#issamenode-1)
    
    The **`isSameNode()`** method of the Node interface is a legacy alias the for the === strict equality operator. That is, it tests whether two nodes are the same (in other words, whether they reference the same object).
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/isSameNode)
    
    #### Parameters
    
    -   otherNode: Node | null
    
    #### Returns boolean
    

### lookupNamespaceURI[](#lookupnamespaceuri)

-   lookupNamespaceURI(prefix: string | null): string | null[](#lookupnamespaceuri-1)
    
    The **`lookupNamespaceURI()`** method of the Node interface takes a prefix as parameter and returns the namespace URI associated with it on the given node if found (and null if not). This method's existence allows Node objects to be passed as a namespace resolver to XPathEvaluator.createExpression() and XPathEvaluator.evaluate().
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupNamespaceURI)
    
    #### Parameters
    
    -   prefix: string | null
    
    #### Returns string | null
    

### lookupPrefix[](#lookupprefix)

-   lookupPrefix(namespace: string | null): string | null[](#lookupprefix-1)
    
    The **`lookupPrefix()`** method of the Node interface returns a string containing the prefix for a given namespace URI, if present, and null if not. When multiple prefixes are possible, the first prefix is returned.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/lookupPrefix)
    
    #### Parameters
    
    -   namespace: string | null
    
    #### Returns string | null
    

### normalize[](#normalize)

-   normalize(): void[](#normalize-1)
    
    The **`normalize()`** method of the Node interface puts the specified node and all of its sub-tree into a normalized form. In a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/normalize)
    
    #### Returns void
    

### removeChild[](#removechild)

-   removeChild<[T](#removechildt) extends Node\>(child: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#removechildt)): [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#removechildt)[](#removechild-1)
    
    The **`removeChild()`** method of the Node interface removes a child node from the DOM and returns the removed node.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/removeChild)
    
    #### Type Parameters
    
    -   T extends Node
    
    #### Parameters
    
    -   child: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#removechildt)
    
    #### Returns [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#removechildt)
    

### removeEventListener[](#removeeventlistener)

-   removeEventListener(  
        type: string,  
        callback: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/) | null,  
        options?: boolean | EventListenerOptions,  
    ): void[](#removeeventlistener-1)
    
    The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
    
    #### Parameters
    
    -   type: string
    -   callback: [EventListenerOrEventListenerObject](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.EventListenerOrEventListenerObject/) | null
    -   `Optional`options: boolean | EventListenerOptions
    
    #### Returns void
    
    Inherited from EventTarget.removeEventListener
    

### replaceChild[](#replacechild)

-   replaceChild<[T](#replacechildt) extends Node\>(node: Node, child: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#replacechildt)): [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#replacechildt)[](#replacechild-1)
    
    The **`replaceChild()`** method of the Node interface replaces a child node within the given (parent) node.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/replaceChild)
    
    #### Type Parameters
    
    -   T extends Node
    
    #### Parameters
    
    -   node: Node
    -   child: [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#replacechildt)
    
    #### Returns [T](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLCanvasElement/#replacechildt)
