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

x/html_parser/src/Node.ts>Node

Port of fb55/htmlparser2 for Deno
Latest
class Node
import { Node } from "https://deno.land/x/html_parser@v0.1.3/src/Node.ts";

This object will be used as the prototype for Nodes when creating a DOM-Level-1-compliant structure.

Properties

endIndex: number | null

The end index of the node. Requires withEndIndices on the handler to be `true.

next: Node | null

Next sibling

nextSibling: Node | null
readonly
nodeType: number
parent: NodeWithChildren | null

Parent of the node

parentNode: NodeWithChildren | null
prev: Node | null

Previous sibling

previousSibling: Node | null
startIndex: number | null

The start index of the node. Requires withStartIndices on the handler to be `true.

Methods

cloneNode<T extends Node>(this: T, recursive?): T

Clone this node, and optionally its children.