Element on MDN

Hierarchy (view full)

Constructors

Properties

childElementCount: number
children: readonly Node[]

Element.children on MDN

firstChild: null | ChildNode

Node.firstChild on MDN

firstElementChild: null | Element
lastChild: null | ChildNode

Node.lastChild on MDN

lastElementChild: null | Element
nextElementSibling: null | Element
nextSibling: null | ChildNode

Node.nextSibling on MDN

nodeName: string

Node.nodeName on MDN

nodeType: number = Node.ELEMENT_NODE

Node.nodeType on MDN

parentNode: null | ParentNode

Node.parentNode on MDN

previousElementSibling: null | Element
previousSibling: null | ChildNode
tagName: string

Element.tagName on MDN

ATTRIBUTE_NODE: number = 2
CDATA_SECTION_NODE: number = 4
COMMENT_NODE: number = 8
DOCUMENT_FRAGMENT_NODE: number = 11
DOCUMENT_NODE: number = 9
DOCUMENT_TYPE_NODE: number = 10
ELEMENT_NODE: number = 1
PROCESSING_INSTRUCTION_NODE: number = 7
TEXT_NODE: number = 3

Accessors

  • get attributes(): Attributes
  • Map from an attribute name to an attribute value. If an attribute is absent then value is undefined.

    Returns Attributes

  • set attributes(value): void
  • Parameters

    Returns void

  • get className(): string
  • Returns string

  • set className(value): void
  • Parameters

    • value: string

    Returns void

  • get id(): string
  • Returns string

    Element.id on MDN

  • set id(value): void
  • Parameters

    • value: string

    Returns void

  • get nodeValue(): null | string
  • Returns null | string

    Node.nodeValue on MDN

  • set nodeValue(value): void
  • Parameters

    • value: null | string

    Returns void

  • get textContent(): null | string
  • Returns null | string

    Node.textContent on MDN

  • set textContent(value): void
  • Parameters

    • value: null | string

    Returns void

    Node.textContent on MDN

Methods

  • Parameters

    • name: string

    Returns null | string

  • Parameters

    • name: string
    • value: string

    Returns this

  • Parameters

    • name: string
    • Optionalforce: boolean

    Returns boolean