Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Element

htmlparser2 tree adapter Element interface.

Hierarchy

Index

Properties

Optional ___location

___location: ElementLocation

Element source code location info. Available if location info is enabled via Options.ParserOptions.

attribs

attribs: object

Element attributes.

Type declaration

  • [name: string]: string

childNodes

childNodes: Node[]

Same as children. DOM spec-compatible alias.

children

children: Node[]

Child nodes.

firstChild

firstChild: Node

First child of the node.

lastChild

lastChild: Node

Last child of the node.

name

name: string

The name of the node. Equals to element tagName.

namespace

namespace: string

Element namespace.

next

next: Node

Next sibling.

nextSibling

nextSibling: Node

Same as next. DOM spec-compatible alias.

nodeType

nodeType: number

DOM spec-compatible node type.

parent

parent: ParentNode

Parent node.

parentNode

parentNode: ParentNode

Same as parent. DOM spec-compatible alias.

prev

prev: Node

Previous sibling.

previousSibling

previousSibling: Node

Same as prev. DOM spec-compatible alias.

tagName

tagName: string

Element tag name.

type

type: string

The type of the node. E.g. Document will have type equal to 'root'`.

x-attribsNamespace

x-attribsNamespace: object

Element attribute namespaces.

Type declaration

  • [name: string]: string

x-attribsPrefix

x-attribsPrefix: object

Element attribute namespace-related prefixes.

Type declaration

  • [name: string]: string

Generated using TypeDoc