Interface Local<T>

interface Local {
    get(node): T;
    remove(node): boolean;
    set(node, value): T;
    toString(): string;
}

Type Parameters

  • T

Methods

  • Retrieves a local variable stored on the node (or one of its parents).

    Parameters

    Returns T

  • Deletes the value associated with the given node. Values stored on ancestors are not affected, meaning that child nodes will still see inherited values.

    This function returns true if there was a value stored directly on the node, and false otherwise.

    Parameters

    Returns boolean

  • Store a value for this local variable. Calling .get() on children of this node will also retrieve the variable's value.

    Parameters

    • node: Element

      A node element.

    • value: T

      Value to store locally

    Returns T

  • Obtain a string with the internally assigned property name for the local which is used to store the value on a node

    Returns string