Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NodeMap<T>

A helper class that maps from a DOM Node to an arbitrary value.

Type parameters

  • T

Hierarchy

Index

Constructors

Methods

Constructors

constructor

Methods

delete

  • delete(node: Node): void
  • Deletes a node from the NodeMap.

    Parameters

    • node: Node

      The node to delete.

    Returns void

get

  • get(node: Node): T
  • Gets the value for the given node.

    Parameters

    • node: Node

      The node to get the value of.

    Returns T

    The value for the given node, or undefined if the node is not present in the map.

has

  • has(node: Node): boolean
  • Determines if a given node is in the NodeMap.

    Parameters

    • node: Node

      The node to determine if it is in the map.

    Returns boolean

    true if the Node is contained in the map, false otherwise.

keys

  • keys(): Node[]
  • Returns Node[]

    an array that holds the nodes that are the keys of the map.

set

  • set(node: Node, value: T): void
  • Sets the value of a node within the map.

    Parameters

    • node: Node

      The node to set the value for.

    • value: T

      the value to associate with the node.

    Returns void

Generated using TypeDoc