Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

§Namespaces

DomUtils
ElementType

§Classes

DefaultHandler
DomHandler
FeedHandler
Parser
RssHandler
Tokenizer

§Enums

DomUtils.DocumentPosition
ElementType.ElementType

Types of elements found in htmlparser2's DOM

§Variables

ElementType.CDATA

Type for

ElementType.Comment

Type for

ElementType.Directive

Type for

ElementType.Doctype

Type for <!doctype ...>

ElementType.Root

Type for the root element of a document

ElementType.Script

Type for tags

ElementType.Style

Type for tags

ElementType.Tag

Type for Any tag

ElementType.Text

Type for Text

§Functions

createDomStream

Creates a parser instance, with an attached DOM handler.

DomUtils.append

Append an element after another.

DomUtils.appendChild

Append a child to an element.

DomUtils.compareDocumentPosition

Compare the position of one node against another node in any other document. The return value is a bitmask with the following values:

DomUtils.existsOne
DomUtils.filter

Search a node and its children for nodes passing a test function.

DomUtils.find

Search an array of node and its children for nodes passing a test function.

DomUtils.findAll

Search and array of nodes and its children for nodes passing a test function.

DomUtils.findOne

Finds one element in a tree that passes a test.

DomUtils.findOneChild

Finds the first element inside of an array that matches a test function.

DomUtils.getAttributeValue

Gets an attribute from an element.

DomUtils.getChildren

Get a node's children.

DomUtils.getElementById
DomUtils.getElements
DomUtils.getElementsByTagName
DomUtils.getElementsByTagType
DomUtils.getFeed

Get the feed object from the root of a DOM tree.

DomUtils.getInnerHTML deprecated
DomUtils.getName

Get the tag name of an element.

DomUtils.getOuterHTML deprecated
DomUtils.getParent
DomUtils.getSiblings

Gets an elements siblings, including the element itself.

DomUtils.getText deprecated

Get a node's inner text. Same as textContent, but inserts newlines for <br> tags.

DomUtils.hasAttrib

Checks whether an element has an attribute.

DomUtils.hasChildren
DomUtils.innerText

Get a node's inner text.

DomUtils.isCDATA
DomUtils.isComment
DomUtils.isDocument
DomUtils.isTag
DomUtils.isText
DomUtils.nextElementSibling

Returns the next element sibling of a node.

DomUtils.prepend

Prepend an element before another.

DomUtils.prependChild

Prepend a child to an element.

DomUtils.prevElementSibling

Returns the previous element sibling of a node.

DomUtils.removeElement

Remove an element from the dom

DomUtils.removeSubsets

Given an array of nodes, remove any member that is contained by another.

DomUtils.replaceElement

Replace an element in the dom

DomUtils.testElement
DomUtils.textContent

Get a node's text content.

DomUtils.uniqueSort

Sort an array of nodes based on their relative position in the document and remove any duplicate nodes. If the array contains nodes that do not belong to the same document, sort order is unspecified.

ElementType.isTag

Tests whether an element is a tag or not.

parseDocument

Parses the data, returns the resulting document.

parseDOM deprecated

Parses data, returns an array of the root nodes.

parseFeed

Parse a feed.

§Interfaces

DomHandlerOptions
DomUtils.Feed
DomUtils.FeedItem
DomUtils.FeedItemMedia
ParserOptions
TokenizerCallbacks

§Type Aliases

DomUtils.FeedItemMediaExpression
DomUtils.FeedItemMediaMedium