Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Local

interface Local <T> {
get(node: Element): T | undefined;
remove(node: Element): boolean;
set(node: Element, value: T): Element;
toString(): string;
}

§Type Parameters

§Methods

§
get(node: Element): T | undefined
[src]

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

@param node

A node element.

§
remove(node: Element): boolean
[src]

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.

@param node

A node element.

§
set(node: Element, value: T): Element
[src]

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

@param node

A node element.

@param value

Value to store locally

§
toString(): string
[src]

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