WeakSet

package js.lib

Available on js

The WeakSet object lets you store weakly held objects in a collection.

Documentation WeakSet by Mozilla Contributors, licensed under CC-BY-SA 2.5.

Static variables

staticfinalread onlylength:Int

The value of the length property is 0.

Constructor

new(?iterable:Any)

If an iterable object is passed, all of its elements will be added to the new WeakSet. null is treated as undefined.

Methods

add(value:{}):WeakSet

Appends a new object with the given value to the WeakSet object.

delete(value:{}):Bool

Removes the element associated to the value. has(value) will return false afterwards.

has(value:{}):Bool

Returns a boolean asserting whether an element is present with the given value in the WeakSet object or not.

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/lib/WeakSet.html