Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_dom/src/api.ts>Node

Browser DOM & HTML parser in Deno
Extremely Popular
Latest
class Node
extends EventTarget
Re-export
import { Node } from "https://deno.land/x/deno_dom@v0.1.48/src/api.ts";

Constructors

new
Node(
nodeName: string,
nodeType: NodeType,
parentNode: Node | null,
key: CTOR_KEY,
)

Properties

private
_ancestors: Set<Node>
childNodes: NodeList
readonly
firstChild: Node | null
readonly
lastChild: Node | null
readonly
nextSibling: Node | null
nodeValue: string | null
readonly
ownerDocument: Document | null
parentElement: Element | null
parentNode: Node | null
readonly
previousSibling: Node | null
textContent: string

Methods

_appendTo(parentNode: Node): this
_remove(skipSetParent?)
_replaceWith(...nodes: (Node | string)[])
_setOwnerDocument(document: Document | null)
_setParent(newParent: Node | null, force?)

Update ancestor chain & owner document for this child and all its children.

cloneNode(deep?): Node
contains(child: Node): boolean
getRootNode(opts?: { composed?: boolean; }): Node
hasChildNodes(): boolean
insertBefore(newNode: Node, refNode: Node | null): Node
replaceChild(newChild: Node, oldChild: Node): Node

Static Properties

ATTRIBUTE_NODE
CDATA_SECTION_NODE
COMMENT_NODE
DOCUMENT_FRAGMENT_NODE
DOCUMENT_NODE
DOCUMENT_POSITION_CONTAINED_BY: 16
DOCUMENT_POSITION_CONTAINS: 8
DOCUMENT_POSITION_DISCONNECTED: 1
DOCUMENT_POSITION_FOLLOWING: 4
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32
DOCUMENT_POSITION_PRECEDING: 2
DOCUMENT_TYPE_NODE
ELEMENT_NODE
ENTITY_NODE
ENTITY_REFERENCE_NODE
NOTATION_NODE
PROCESSING_INSTRUCTION_NODE
TEXT_NODE
interface Node
Re-export
import { type Node } from "https://deno.land/x/deno_dom@v0.1.48/src/api.ts";

Properties

ELEMENT_NODE: NodeType
ATTRIBUTE_NODE: NodeType
TEXT_NODE: NodeType
CDATA_SECTION_NODE: NodeType
ENTITY_REFERENCE_NODE: NodeType
ENTITY_NODE: NodeType
PROCESSING_INSTRUCTION_NODE: NodeType
COMMENT_NODE: NodeType
DOCUMENT_NODE: NodeType
DOCUMENT_TYPE_NODE: NodeType
DOCUMENT_FRAGMENT_NODE: NodeType
NOTATION_NODE: NodeType
type alias Node
Re-export
import { type Node } from "https://deno.land/x/deno_dom@v0.1.48/src/api.ts";
definition: ConstructibleNode
variable Node
Re-export
import { Node } from "https://deno.land/x/deno_dom@v0.1.48/src/api.ts";

type

Pick<ConstructibleNode, keyof ConstructibleNode> & Function