externalElement
Hierarchy
- NodeWithChildren
- Element
Index
Constructors
externalconstructor
Parameters
externalname: string
Name of the tag, eg.
div
,span
.externalattribs: {}
Object mapping attribute names to attribute values.
externaloptionalchildren: ChildNode[]
Children of the node.
externaloptionaltype: Script | Style | Tag
Returns Element
Properties
externalattribs
Type declaration
externalinheritedchildren
externalinheritedendIndex
The end index of the node. Requires withEndIndices
on the handler to be `true.
externalname
externaloptionalnamespace
Element namespace (parse5 only).
externalinheritednext
Next sibling
externalinheritedparent
Parent of the node
externalinheritedprev
Previous sibling
externaloptionalsourceCodeLocation
parse5
source code location info, with start & end tags.
Available if parsing with parse5 and location info is enabled.
externalinheritedstartIndex
The start index of the node. Requires withStartIndices
on the handler to be `true.
externaltype
The type of the node.
externaloptionalx-attribsNamespace
Element attribute namespaces (parse5 only).
externaloptionalx-attribsPrefix
Element attribute namespace-related prefixes (parse5 only).
Accessors
externalattributes
Returns Attribute[]
externalinheritedchildNodes
Same as children. DOM spec-compatible alias.
Returns ChildNode[]
Parameters
externalchildren: ChildNode[]
Returns void
externalinheritedfirstChild
First child of the node.
Returns null | ChildNode
externalinheritedlastChild
Last child of the node.
Returns null | ChildNode
externalinheritednextSibling
Same as next. DOM spec-compatible alias.
Returns null | ChildNode
Parameters
externalnext: null | ChildNode
Returns void
externalnodeType
DOM spec-compatible node type.
Returns 1
externalinheritedparentNode
Same as parent. DOM spec-compatible alias.
Returns null | ParentNode
Parameters
externalparent: null | ParentNode
Returns void
externalinheritedpreviousSibling
Same as prev. DOM spec-compatible alias.
Returns null | ChildNode
Parameters
externalprev: null | ChildNode
Returns void
externaltagName
Same as name. DOM spec-compatible alias.
Returns string
Parameters
externalname: string
Returns void
Methods
externalinheritedcloneNode
Clone this node, and optionally its children.
Parameters
externalthis: T
externaloptionalrecursive: boolean
Clone child nodes as well.
Returns T
A clone of the node.
An element within the DOM.