aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/javascript/reference/global_objects/weakset
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/ca/web/javascript/reference/global_objects/weakset
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip
initial commit
Diffstat (limited to 'files/ca/web/javascript/reference/global_objects/weakset')
-rw-r--r--files/ca/web/javascript/reference/global_objects/weakset/add/index.html103
-rw-r--r--files/ca/web/javascript/reference/global_objects/weakset/clear/index.html87
-rw-r--r--files/ca/web/javascript/reference/global_objects/weakset/delete/index.html112
-rw-r--r--files/ca/web/javascript/reference/global_objects/weakset/has/index.html113
-rw-r--r--files/ca/web/javascript/reference/global_objects/weakset/index.html201
-rw-r--r--files/ca/web/javascript/reference/global_objects/weakset/prototype/index.html131
6 files changed, 747 insertions, 0 deletions
diff --git a/files/ca/web/javascript/reference/global_objects/weakset/add/index.html b/files/ca/web/javascript/reference/global_objects/weakset/add/index.html
new file mode 100644
index 0000000000..983b24329a
--- /dev/null
+++ b/files/ca/web/javascript/reference/global_objects/weakset/add/index.html
@@ -0,0 +1,103 @@
+---
+title: WeakSet.prototype.add()
+slug: Web/JavaScript/Reference/Global_Objects/WeakSet/add
+translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet/add
+---
+<div>{{JSRef}}</div>
+
+<p>El mètode <code><strong>add()</strong></code> afegeix un nou objecte al final d'un objecte <code>WeakSet</code>.</p>
+
+<h2 id="Sintaxi">Sintaxi</h2>
+
+<pre class="syntaxbox"><code><em>ws</em>.add(value);</code></pre>
+
+<h3 id="Paràmetres">Paràmetres</h3>
+
+<dl>
+ <dt>value</dt>
+ <dd>Necessari. L'objecte que es vol afegir a la col·lecció de <code>WeakSet.</code></dd>
+</dl>
+
+<h2 id="Utilitzar_el_mètode_add">Utilitzar el mètode <code>add</code></h2>
+
+<pre class="brush: js">var ws = new WeakSet();
+
+ws.add(window); // afegeix l'objecte window al WeakSet
+
+ws.has(window); // true
+</pre>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificació</th>
+ <th scope="col">Estat</th>
+ <th scope="col">Comentaris</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-weakset.prototype.add', 'WeakSet.prototype.add')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td>Definició inicial.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>36</td>
+ <td>{{CompatGeckoDesktop(34)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>23</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoMobile(34) }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>{{jsxref("WeakSet")}}</li>
+ <li>{{jsxref("WeakSet.prototype.delete()")}}</li>
+ <li>{{jsxref("WeakSet.prototype.has()")}}</li>
+</ul>
diff --git a/files/ca/web/javascript/reference/global_objects/weakset/clear/index.html b/files/ca/web/javascript/reference/global_objects/weakset/clear/index.html
new file mode 100644
index 0000000000..4e6b2e6f8c
--- /dev/null
+++ b/files/ca/web/javascript/reference/global_objects/weakset/clear/index.html
@@ -0,0 +1,87 @@
+---
+title: WeakSet.prototype.clear()
+slug: Web/JavaScript/Reference/Global_Objects/WeakSet/clear
+translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet/clear
+---
+<div>{{JSRef}} {{obsolete_header}}</div>
+
+<p>El mètode <code><strong>clear()</strong></code> elimina tots els elements d'un objecte <code>WeakSet.</code></p>
+
+<h2 id="Sintaxi">Sintaxi</h2>
+
+<pre class="syntaxbox"><code><em>ws</em>.clear();</code></pre>
+
+<h2 id="Exemples">Exemples</h2>
+
+<h3 id="Utilitzar_el_mètode_clear">Utilitzar el mètode <code>clear</code></h3>
+
+<pre class="brush: js">var ws = new WeakSet();
+
+ws.add(window);
+ws.has(window); // true
+
+ws.clear();
+
+ws.has(window); // false
+</pre>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<p>No forma part de cap especificació actual o borrador. Aquest mètode formava part del borrador de l'especificació d'ECMAScript 6 fins la revisió 28 (versió del 14 d'octubre del 2014), però s'ha eliminat en versions posteriors del borrador. No formarà part de l'estàndard final.</p>
+
+<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>36</td>
+ <td>{{CompatGeckoDesktop(34)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>23</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoMobile(34)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>{{jsxref("WeakSet")}}</li>
+ <li>{{jsxref("WeakSet.prototype.delete()")}}</li>
+</ul>
diff --git a/files/ca/web/javascript/reference/global_objects/weakset/delete/index.html b/files/ca/web/javascript/reference/global_objects/weakset/delete/index.html
new file mode 100644
index 0000000000..9bfaa0f439
--- /dev/null
+++ b/files/ca/web/javascript/reference/global_objects/weakset/delete/index.html
@@ -0,0 +1,112 @@
+---
+title: WeakSet.prototype.delete()
+slug: Web/JavaScript/Reference/Global_Objects/WeakSet/delete
+translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet/delete
+---
+<div>{{JSRef}}</div>
+
+<p>El mètode <code><strong>delete()</strong></code>elimina l'element especificat de l'objecte <code>WeakSet.</code></p>
+
+<h2 id="Sintaxi">Sintaxi</h2>
+
+<pre class="syntaxbox"><code><em>ws</em>.delete(value);</code></pre>
+
+<h3 id="Paràmetres">Paràmetres</h3>
+
+<dl>
+ <dt>value</dt>
+ <dd>Necessari. L'objecte que es vol eliminar de l'objecte <code>WeakSet.</code></dd>
+</dl>
+
+<h3 id="Return_value">Return value</h3>
+
+<p>Retorna <code>true</code> si l'element dins l'objecte <code>WeakSet</code> s'ha eliminat satisfactòriament; Del cas contrari retornarà <code>false</code>.</p>
+
+<h2 id="Exemples">Exemples</h2>
+
+<h3 id="Utilitzar_el_mètode_delete">Utilitzar el mètode <code>delete</code></h3>
+
+<pre class="brush: js">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.
+</pre>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificació</th>
+ <th scope="col">Estat</th>
+ <th scope="col">Comentaris</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-weakset.prototype.delete', 'WeakSet.prototype.delete')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td>Definició inicial.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>36</td>
+ <td>{{CompatGeckoDesktop(34)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>23</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoMobile(34) }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>{{jsxref("WeakSet")}}</li>
+ <li>{{jsxref("WeakSet.prototype.clear()")}}</li>
+</ul>
diff --git a/files/ca/web/javascript/reference/global_objects/weakset/has/index.html b/files/ca/web/javascript/reference/global_objects/weakset/has/index.html
new file mode 100644
index 0000000000..b2074a9847
--- /dev/null
+++ b/files/ca/web/javascript/reference/global_objects/weakset/has/index.html
@@ -0,0 +1,113 @@
+---
+title: WeakSet.prototype.has()
+slug: Web/JavaScript/Reference/Global_Objects/WeakSet/has
+translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet/has
+---
+<div>{{JSRef}}</div>
+
+<p>El mètode <code><strong>has()</strong></code> retorna un booleà indicant si un objecte existeix o no en unmethod returns a boolean indicating whether an object exists in a <code>WeakSet</code> or not.</p>
+
+<h2 id="Sintaxi">Sintaxi</h2>
+
+<pre class="syntaxbox"><code><em>ws</em>.has(valor);</code></pre>
+
+<h3 id="Paràmetres">Paràmetres</h3>
+
+<dl>
+ <dt>valor</dt>
+ <dd>Necessari. L'objecte a comprovar la seva presència en <code>WeakSet</code>.</dd>
+</dl>
+
+<h3 id="Valor_de_retorn">Valor de retorn</h3>
+
+<dl>
+ <dt>Booleà</dt>
+ <dd>Retorna <code>true</code> si un element amb el valor especificat existeix en l'objecte <code>WeakSet</code>; en el cas contrari retornarà <code>false</code>.</dd>
+</dl>
+
+<h2 id="Exemples">Exemples</h2>
+
+<h3 id="Utilitzar_el_mètode_has">Utilitzar el mètode <code>has</code></h3>
+
+<pre class="brush: js">var ws = new WeakSet();
+var obj = {};
+ws.add(window);
+
+mySet.has(window); // retorna true
+mySet.has(obj); // retorna false
+</pre>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificació</th>
+ <th scope="col">Estat</th>
+ <th scope="col">Comentaris</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-weakset.prototype.has', 'WeakSet.prototype.has')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td>Definició inicial.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>36</td>
+ <td>{{CompatGeckoDesktop(34)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>23</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoMobile(34) }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>{{jsxref("WeakSet")}}</li>
+ <li>{{jsxref("WeakSet.prototype.add()")}}</li>
+ <li>{{jsxref("WeakSet.prototype.delete()")}}</li>
+</ul>
diff --git a/files/ca/web/javascript/reference/global_objects/weakset/index.html b/files/ca/web/javascript/reference/global_objects/weakset/index.html
new file mode 100644
index 0000000000..d1ae3999a6
--- /dev/null
+++ b/files/ca/web/javascript/reference/global_objects/weakset/index.html
@@ -0,0 +1,201 @@
+---
+title: WeakSet
+slug: Web/JavaScript/Reference/Global_Objects/WeakSet
+tags:
+ - ECMAScript6
+ - Experimental
+ - JavaScript
+ - NeedsTranslation
+ - TopicStub
+ - WeakSet
+translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet
+---
+<div>{{JSRef}}</div>
+
+<p><u>L'objecte <strong><code>WeakSet</code></strong> permet emmagatzemar dèbilment <em>objects</em> en una col·lecció.</u></p>
+
+<h2 id="Sintaxi">Sintaxi</h2>
+
+<pre class="syntaxbox"> new WeakSet([iterable]);</pre>
+
+<h3 id="Paràmetres">Paràmetres</h3>
+
+<dl>
+ <dt>iterable</dt>
+ <dd>Si es pasa un <a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">objecte iterable</a>, tots els seus elements seràn afegits al nou <code>WeakSet</code>. null es tractat com a undefined.</dd>
+</dl>
+
+<h2 id="Descripció">Descripció</h2>
+
+<p>Els objectes <code>WeakSet</code> són col·leccions d'objectes. Un objecte al <code>WeakSet</code> només pot passar un cop, és únic en la col·lecció de <code>WeakSet.</code></p>
+
+<p>Les principals diferències respecte l'objecte {{jsxref("Set")}} són:</p>
+
+<ul>
+ <li>Al contrari que <code>Sets</code>, <code>WeakSets</code> són <strong>únicament col·leccions d'objectes</strong> i no de valors arbitraris de qualsevol tipus.</li>
+ <li> <code>WeakSet</code> és <em>dèbil (weak)</em>: Les referències a la col·lecció es mantenen dèbilment. SI no hi ha cap altra referència a un objecte emmagatzemat en <code>WeakSet</code>,<u> poden ser recollits com a brossa</u>. Això també vol dir que no hi ha cap llista d'objectes actuals emmagatzemats a la col·lecció. <code>WeakSets</code> no són enumerables.</li>
+</ul>
+
+<h2 id="Propietats">Propietats</h2>
+
+<dl>
+ <dt><code>WeakSet.length</code></dt>
+ <dd>El valor de la propietat <code>length</code> és 0.</dd>
+ <dt>{{jsxref("WeakSet.prototype")}}</dt>
+ <dd>Representa el prototip per al constructor de <code>Set.</code> Permet afegir propietats a tots els objectes <code>WeakSet</code>.</dd>
+</dl>
+
+<h2 id="Instàncies_WeakSet">Instàncies <code>WeakSet</code></h2>
+
+<p>Totes les instàncies <code>WeakSet</code> hereten de {{jsxref("WeakSet.prototype")}}.</p>
+
+<h3 id="Propietats_2">Propietats</h3>
+
+<p>{{page('en-US/Web/JavaScript/Reference/Global_Objects/WeakSet/prototype','Properties')}}</p>
+
+<h3 id="Mètodes">Mètodes</h3>
+
+<p>{{page('en-US/Web/JavaScript/Reference/Global_Objects/WeakSet/prototype','Methods')}}</p>
+
+<h2 id="Exemples">Exemples</h2>
+
+<h3 id="Utilitzar_l'objecte_WeakSet">Utilitzar l'objecte <code>WeakSet</code></h3>
+
+<pre class="brush: js">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
+</pre>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificació</th>
+ <th scope="col">Estat</th>
+ <th scope="col">Comentaris</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-weakset-objects', 'WeakSet')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td>Definició inicial.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatChrome(36)}}</td>
+ <td>{{ CompatGeckoDesktop(34) }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatOpera(23) }}</td>
+ <td>9</td>
+ </tr>
+ <tr>
+ <td><code>new WeakSet(iterable)</code></td>
+ <td>38</td>
+ <td>{{ CompatGeckoDesktop(34) }}</td>
+ <td>{{CompatNo}}</td>
+ <td>25</td>
+ <td>9</td>
+ </tr>
+ <tr>
+ <td>Constructor argument: <code>new WeakSet(null)</code></td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop("37")}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>9</td>
+ </tr>
+ <tr>
+ <td>Monkey-patched <code>add()</code> in Constructor</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop("37")}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>9</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoMobile(34) }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>9</td>
+ </tr>
+ <tr>
+ <td><code>new WeakMap(iterable)</code></td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoMobile(34) }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>9</td>
+ </tr>
+ <tr>
+ <td>Constructor argument: <code>new WeakSet(null)</code></td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>9</td>
+ </tr>
+ <tr>
+ <td>Monkey-patched <code>add()</code> in Constructor</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>9</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>{{jsxref("Map")}}</li>
+ <li>{{jsxref("Set")}}</li>
+ <li>{{jsxref("WeakMap")}}</li>
+</ul>
diff --git a/files/ca/web/javascript/reference/global_objects/weakset/prototype/index.html b/files/ca/web/javascript/reference/global_objects/weakset/prototype/index.html
new file mode 100644
index 0000000000..2b4cd51048
--- /dev/null
+++ b/files/ca/web/javascript/reference/global_objects/weakset/prototype/index.html
@@ -0,0 +1,131 @@
+---
+title: WeakSet.prototype
+slug: Web/JavaScript/Reference/Global_Objects/WeakSet/prototype
+translation_of: Web/JavaScript/Reference/Global_Objects/WeakSet
+---
+<div>{{JSRef}}</div>
+
+<p>La propietat <code><strong>WeakSet</strong></code><strong><code>.prototype</code></strong> representa el prototip pel constructor {{jsxref("WeakSet")}}.</p>
+
+<div>{{js_property_attributes(0,0,0)}}</div>
+
+<h2 id="Descripció">Descripció</h2>
+
+<p>Les instàncies {{jsxref("WeakSet")}} hereten de {{jsxref("WeakSet.prototype")}}. Es pot utilitzar l'objecte prototip del constructor per afegir propietats o mètodes a totes les instàncies <code>WeakSet</code>.</p>
+
+<p><code>WeakSet.prototype</code> és en si mateix només un objecte ordinari</p>
+
+<pre class="brush: js">Object.prototype.toString.call(WeakSet.prototype); // "[object Object]"</pre>
+
+<h2 id="Propietats">Propietats</h2>
+
+<dl>
+ <dt><code>WeakSet.prototype.constructor</code></dt>
+ <dd>Retorna la funció que ha creat un prototip de la instància. Aquesta és la funció {{jsxref("WeakSet")}} per defecte.</dd>
+</dl>
+
+<h2 id="Mètodes">Mètodes</h2>
+
+<dl>
+ <dt>{{jsxref("WeakSet.add", "WeakSet.prototype.add(value)")}}</dt>
+ <dd>Afegeix un nou element amb el valor donat a l'objecte <code>WeakSet.</code></dd>
+ <dt>{{jsxref("WeakSet.delete", "WeakSet.prototype.delete(value)")}}</dt>
+ <dd>Elimina l'element associat al <code>value</code>. <code>WeakSet.prototype.has(value)</code> retornarà després <code>false</code>.</dd>
+ <dt>{{jsxref("WeakSet.has", "WeakSet.prototype.has(value)")}}</dt>
+ <dd>Retorna un booleà afirmant si un element és o no present amb el valor donat en l'objecte <code>WeakSet</code>.</dd>
+ <dt><s class="obsoleteElement">{{jsxref("WeakSet.prototype.clear()")}} {{obsolete_inline}}</s></dt>
+ <dd><s class="obsoleteElement">Elimina tots els elements de l'objecte <code>WeakSet.</code></s></dd>
+</dl>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificació</th>
+ <th scope="col">Estat</th>
+ <th scope="col">Comentaris</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('ES6', '#sec-weakset.prototype', 'WeakSet.prototype')}}</td>
+ <td>{{Spec2('ES6')}}</td>
+ <td>Definició inicial.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>36</td>
+ <td>{{ CompatGeckoDesktop(34) }}</td>
+ <td>{{CompatNo}}</td>
+ <td>23</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ <tr>
+ <td>Objecte ordinari</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoDesktop("40")}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome per Android</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{ CompatGeckoMobile(34) }}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ <tr>
+ <td>Objecte ordinari</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoMobile("40")}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>{{jsxref("Set.prototype")}}</li>
+ <li>{{jsxref("WeakMap.prototype")}}</li>
+</ul>