Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

WeakSet.prototype

This article needs an editorial review. How you can help.

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.

La propietat WeakSet.prototype representa el prototip pel constructor WeakSet.

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

Descripció

Les instàncies WeakSet hereten de WeakSet.prototype. Es pot utilitzar l'objecte prototip del constructor per afegir propietats o mètodes a totes les instàncies WeakSet.

WeakSet.prototype és en si mateix només un objecte ordinari

Object.prototype.toString.call(WeakSet.prototype); // "[object Object]"

Propietats

WeakSet.prototype.constructor
Retorna la funció que ha creat un prototip de la instància. Aquesta és la funció WeakSet per defecte.

Mètodes

WeakSet.prototype.add(value)
Afegeix un nou element amb el valor donat a l'objecte WeakSet.
WeakSet.prototype.delete(value)
Elimina l'element associat al value. WeakSet.prototype.has(value) retornarà després false.
WeakSet.prototype.has(value)
Retorna un booleà afirmant si un element és o no present amb el valor donat en l'objecte WeakSet.
WeakSet.prototype.clear()
Elimina tots els elements de l'objecte WeakSet.

Especificacions

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

Compatibilitat amb navegadors

Característica Chrome Firefox (Gecko) Internet Explorer Opera Safari
Suport bàsic 36 34 (34) Not supported 23 Not supported
Objecte ordinari ? 40 (40) ? ? ?
Característica Chrome per Android Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Suport bàsic Not supported Not supported 34.0 (34) Not supported Not supported Not supported
Objecte ordinari ? ? 40.0 (40) ? ? ?

Vegeu també

Document Tags and Contributors

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