From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../reference/global_objects/weakset/index.html | 201 --------------------- 1 file changed, 201 deletions(-) delete mode 100644 files/ca/web/javascript/reference/global_objects/weakset/index.html (limited to 'files/ca/web/javascript/reference/global_objects/weakset/index.html') diff --git a/files/ca/web/javascript/reference/global_objects/weakset/index.html b/files/ca/web/javascript/reference/global_objects/weakset/index.html deleted file mode 100644 index d1ae3999a6..0000000000 --- a/files/ca/web/javascript/reference/global_objects/weakset/index.html +++ /dev/null @@ -1,201 +0,0 @@ ---- -title: WeakSet -slug: Web/JavaScript/Reference/Global_Objects/WeakSet -tags: - - ECMAScript6 - - Experimental - - JavaScript - - NeedsTranslation - - TopicStub - - WeakSet -translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet ---- -
{{JSRef}}
- -

L'objecte WeakSet permet emmagatzemar dèbilment objects en una col·lecció.

- -

Sintaxi

- -
 new WeakSet([iterable]);
- -

Paràmetres

- -
-
iterable
-
Si es pasa un objecte iterable, tots els seus elements seràn afegits al nou WeakSet. null es tractat com a undefined.
-
- -

Descripció

- -

Els objectes WeakSet són col·leccions d'objectes. Un objecte al WeakSet només pot passar un cop, és únic en la col·lecció de WeakSet.

- -

Les principals diferències respecte l'objecte {{jsxref("Set")}} són:

- - - -

Propietats

- -
-
WeakSet.length
-
El valor de la propietat length és 0.
-
{{jsxref("WeakSet.prototype")}}
-
Representa el prototip per al constructor de Set. Permet afegir propietats a tots els objectes WeakSet.
-
- -

Instàncies WeakSet

- -

Totes les instàncies WeakSet hereten de {{jsxref("WeakSet.prototype")}}.

- -

Propietats

- -

{{page('en-US/Web/JavaScript/Reference/Global_Objects/WeakSet/prototype','Properties')}}

- -

Mètodes

- -

{{page('en-US/Web/JavaScript/Reference/Global_Objects/WeakSet/prototype','Methods')}}

- -

Exemples

- -

Utilitzar l'objecte WeakSet

- -
var ws = new WeakSet();
-var obj = {};
-var foo = {};
-
-ws.add(window);
-ws.add(obj);
-
-ws.has(window); // true
-ws.has(foo);    // false, foo no s'ha afegit al conjunt
-
-ws.delete(window); // elimina window del conjunt
-ws.has(window);    // false, window ha sigut eliminat
-
-ws.clear(); // buida tot el WeakSet
-
- -

Especificacions

- - - - - - - - - - - - - - -
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-weakset-objects', 'WeakSet')}}{{Spec2('ES6')}}Definició inicial.
- -

Compatibilitat amb navegadors

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome(36)}}{{ CompatGeckoDesktop(34) }}{{CompatNo}}{{ CompatOpera(23) }}9
new WeakSet(iterable)38{{ CompatGeckoDesktop(34) }}{{CompatNo}}259
Constructor argument: new WeakSet(null){{CompatVersionUnknown}}{{CompatGeckoDesktop("37")}}{{CompatUnknown}}{{CompatUnknown}}9
Monkey-patched add() in Constructor{{CompatVersionUnknown}}{{CompatGeckoDesktop("37")}}{{CompatUnknown}}{{CompatUnknown}}9
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{ CompatGeckoMobile(34) }}{{CompatNo}}{{CompatNo}}9
new WeakMap(iterable){{CompatNo}}{{ CompatGeckoMobile(34) }}{{CompatNo}}{{CompatNo}}9
Constructor argument: new WeakSet(null){{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}9
Monkey-patched add() in Constructor{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}9
-
- -

Vegeu també

- - -- cgit v1.2.3-54-g00ecf