class dom::WeakMap

sys::Obj
  dom::WeakMap

@Js

Source

WeakMap is a collection of key/value pairs in which the keys are weakly referenced. The keys must be objects and the values can be arbitrary values.

delete

Bool delete(Obj key)

Source

Removes any value associated to the key. Returns true if an element has been removed successfully.

get

@Operator
Obj? get(Obj key)

Source

Returns the value associated to the key, or null if there is none.

has

Bool has(Obj key)

Source

Return true if key exists in this map.

set

@Operator
This set(Obj key, Obj val)

Source

Sets value for given key in this map. Returns this.