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.delete()

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.

El mètode delete()elimina l'element especificat de l'objecte WeakSet.

Sintaxi

ws.delete(value);

Paràmetres

value
Necessari. L'objecte que es vol eliminar de l'objecte WeakSet.

Return value

Retorna true si l'element dins l'objecte WeakSet s'ha eliminat satisfactòriament; Del cas contrari retornarà false.

Exemples

Utilitzar el mètode delete

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

ws.add(window);

ws.delete(obj);    // Retorna false. No s'ha trobat cap obj per eliminar.
ws.delete(window); // Retorna true.  Eliminat satisfactòriament.

ws.has(window);    // Retorna false. window ja no és present en WeakSet.

Especificacions

Especificació Estat Comentaris
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'WeakSet.prototype.delete' 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
Característica Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Suport bàsic Not supported 34.0 (34) Not supported Not supported Not supported

Vegeu també

Document Tags and Contributors

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