WeakSet.prototype
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ésfalse
. 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'objecteWeakSet.
Especificacions
Especificació | Estat | Comentaris |
---|---|---|
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'WeakSet.prototype' 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! (en-US)
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Suport bàsic | 36 | 34 (34) | No support | 23 | No support |
Objecte ordinari | ? | 40 (40) | ? | ? | ? |
Característica | Chrome per Android | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Suport bàsic | No support | No support | 34.0 (34) | No support | No support | No support |
Objecte ordinari | ? | ? | 40.0 (40) | ? | ? | ? |