We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

This is a new technology, part of the ECMAScript 2015 (ES6) standard.
This technology's specification has been finalized, but check the compatibility table for usage and implementation status in various browsers.

El mètode add() afegeix un nou objecte al final d'un objecte WeakSet.




Necessari. L'objecte que es vol afegir a la col·lecció de WeakSet.

Utilitzar el mètode add

var ws = new WeakSet();

ws.add(window); // afegeix l'objecte window al WeakSet

ws.has(window); // true


Especificació Estat Comentaris
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'WeakSet.prototype.add' in that specification.
Standard Definició inicial.

Compatibilitat amb navegadors

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Característica Chrome Firefox (Gecko) Internet Explorer Opera Safari
Suport bàsic 36 34 (34) No support 23 No support
Característica Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Suport bàsic No support 34.0 (34) No support No support No support

Vegeu també

Document Tags and Contributors

 Contributors to this page: llue
 Last updated by: llue,