Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface INode

Hierarchy

  • INode

Implemented by

Index

Methods

addAttributes

  • addAttributes(map: __type): INode

addClasses

  • addClasses(...classes: string[]): INode
  • Adds the given classes to the node.

    Parameters

    • Rest ...classes: string[]

      the classes to add

    Returns INode

addDataAttributes

  • addDataAttributes(map: __type): INode

appendChild

containsClass

  • containsClass(className: string): boolean
  • Check if classList contains className

    Parameters

    • className: string

      the class which should be contained

    Returns boolean

find

  • find(selector: string): INode

findAll

  • findAll(selector: string): Array<INode>

getAttribute

  • getAttribute(qualifier: string): string | null
  • Returns the attribute value

    Parameters

    • qualifier: string

      the attribute qualifier

    Returns string | null

getParentByClass

  • getParentByClass(className: string): INode | undefined

innerText

  • innerText(str?: undefined | string): INode

onClick

  • onClick(callback: function, options?: AddEventListenerOptions): void
  • Parameters

    • callback: function
        • (e: MouseEvent): void
        • Parameters

          • e: MouseEvent

          Returns void

    • Optional options: AddEventListenerOptions

    Returns void

parent

removeAttributes

  • removeAttributes(...qualifiers: string[]): INode
  • Removes the given attributes from the node.

    Parameters

    • Rest ...qualifiers: string[]

      the attributes qualifiers

    Returns INode

removeChild

  • removeChild(node: INode): void

removeClasses

  • removeClasses(...classes: string[]): INode
  • Removes the given classes from the node.

    Parameters

    • Rest ...classes: string[]

      the classes to remove

    Returns INode

setId

  • setId(id?: undefined | string): void

setName

  • setName(name?: undefined | string): void

setStyle

  • setStyle(map: object): INode

toggle

  • toggle(): void

toggleClass

  • toggleClass(className: string): void
  • Adds the given class name to the node if missing. Removes it otherwise.

    Parameters

    • className: string

      the class name

    Returns void

unwrap

  • unwrap(): HTMLElement

Generated using TypeDoc