Appends a child node to the given parent node.
Parent node.
Child node.
Creates a comment node.
Comment text.
Creates a document node.
Creates a document fragment node.
Removes a node from its parent.
Node to remove.
Returns the given node's children in an array.
Node.
Returns the given comment node's content.
Comment node.
Returns document mode.
Document node.
Returns the given document type node's name.
Document type node.
Returns the given document type node's public identifier.
Document type node.
Returns the given document type node's system identifier.
Document type node.
Returns the first child of the given node.
Node.
Returns the given element's namespace.
Element.
Returns the given node's parent.
Node.
Returns the given element's tag name.
Element.
Returns the <template> element content element.
<template> element.
Returns the given text node's content.
Text node.
Inserts a child node to the given parent node before the given reference node.
Parent node.
Child node.
Reference node.
Inserts text into a node. If the last child of the node is a text node, the provided text will be appended to the text node content. Otherwise, inserts a new text node with the given text.
Node to insert text into.
Text to insert.
Inserts text into a sibling node that goes before the reference node. If this sibling node is the text node, the provided text will be appended to the text node content. Otherwise, inserts a new sibling text node with the given text before the reference node.
Node to insert text into.
Text to insert.
Node to insert text before.
Determines if the given node is a comment node.
Node.
Determines if the given node is a document type node.
Node.
Determines if the given node is an element.
Node.
Determines if the given node is a text node.
Node.
Sets the document mode.
Document node.
Document mode.
Sets the document type. If the document already contains a document type node, the name, publicId and systemId
properties of this node will be updated with the provided values. Otherwise, creates a new document type node
with the given properties and inserts it into the document.
Document node.
Document type name.
Document type public identifier.
Document type system identifier.
Sets the <template> element content element.
<template> element.
Content element.
Generated using TypeDoc
Tree adapter is a set of utility functions that provides minimal required abstraction layer beetween parser and a specific AST format. Note that
TreeAdapteris not designed to be a general purpose AST manipulation library. You can build such library on top of existingTreeAdapteror use one of the existing libraries from npm.default implementation