WeakSet
Widely available since 2018-03-30
A WeakSet
object stores unique values of any type without creating strong references to the values, such that membership in the set does not prevent garbage collection of the value.
Learning resources on MDN
Browser support
- Chrome 36 Released on 2014-07-16
- Chrome Android 36 Released on 2014-07-16
- Edge 12 Released on 2015-07-29
- Firefox 34 Released on 2014-12-01
- Firefox for Android 34 Released on 2014-12-01
- Safari 9 Released on 2015-09-30
- Safari on iOS 9 Released on 2015-09-16
Specifications
- ECMAScript® 2025 Language Specification (#sec-weakset-objects), from TC39 (Ecma International).
View web-platform-tests results for this feature - View the feature source file - Edit the feature - Report an issue about this feature