Skip to main content

Element

An element within the DOM.

Hierarchy

Index

Constructors

constructor

  • Parameters

    • name: string
    • attributes: NodeAttribute[]
    • children: Node[] = []
    • type: Script | Style | Tag = ...

    Returns Element

Properties

publicattributes

attributes: NodeAttribute[]

children

children: Node[] = []

close

close: undefined | CharValue

loc

loc: Range

publicname

name: string

open

open: CharValue

parent

parent: null | NodeWithChildren = null

optionalx-attribsNamespace

x-attribsNamespace?: Record<string, string>

optionalx-attribsPrefix

x-attribsPrefix?: Record<string, string>

Accessors

tagName

  • get tagName(): string
  • set tagName(name: string): void
  • Returns string

  • Parameters

    • name: string

    Returns void