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 has() retorna un booleà indicant si un objecte existeix o no en unmethod returns a boolean indicating whether an object exists in a WeakSet or not.




Necessari. L'objecte a comprovar la seva presència en WeakSet.

Valor de retorn

Retorna true si un element amb el valor especificat existeix en l'objecte WeakSet; en el cas contrari retornarà false.


Utilitzar el mètode has

var ws = new WeakSet();
var obj = {};

mySet.has(window);  // retorna true
mySet.has(obj);     // retorna false


Especificació Estat Comentaris
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'WeakSet.prototype.has' 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,