MDN wants to learn about developers like you:

The WeakSet.prototype property represents the prototype for the WeakSet constructor.

Property attributes of WeakSet.prototype
Writable no
Enumerable no
Configurable no


WeakSet instances inherit from WeakSet.prototype. You can use the constructor's prototype object to add properties or methods to all WeakSet instances.

WeakSet.prototype is itself just an ordinary object:; // "[object Object]"


Returns the function that created an instance's prototype. This is the WeakSet function by default.


Appends a new object with the given value to the WeakSet object.
Removes the element associated to the value. WeakSet.prototype.has(value) will return false afterwards.
Returns a boolean asserting whether an element is present with the given value in the WeakSet object or not.
Removes all elements from the WeakSet object.


Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'WeakSet.prototype' in that specification.
Standard Initial definition.
ECMAScript Latest Draft (ECMA-262)
The definition of 'WeakSet.prototype' in that specification.
Living Standard  

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support36 Yes34 No239
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic support3636 Yes34 No239

See also

Document Tags and Contributors

 Contributors to this page: fscholz, jameshkramer, kdex, andradei, claudepache, realityking, teoli
 Last updated by: fscholz,