aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/javascript/reference/global_objects
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 21:46:22 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 21:46:22 -0500
commita065e04d529da1d847b5062a12c46d916408bf32 (patch)
treefe0f8bcec1ff39a3c499a2708222dcf15224ff70 /files/ca/web/javascript/reference/global_objects
parent218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (diff)
downloadtranslated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.gz
translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.bz2
translated-content-a065e04d529da1d847b5062a12c46d916408bf32.zip
update based on https://github.com/mdn/yari/issues/2028
Diffstat (limited to 'files/ca/web/javascript/reference/global_objects')
-rw-r--r--files/ca/web/javascript/reference/global_objects/function/arity/index.html70
-rw-r--r--files/ca/web/javascript/reference/global_objects/object/count/index.html82
-rw-r--r--files/ca/web/javascript/reference/global_objects/object/eval/index.html85
-rw-r--r--files/ca/web/javascript/reference/global_objects/object/observe/index.html191
4 files changed, 0 insertions, 428 deletions
diff --git a/files/ca/web/javascript/reference/global_objects/function/arity/index.html b/files/ca/web/javascript/reference/global_objects/function/arity/index.html
deleted file mode 100644
index d330307535..0000000000
--- a/files/ca/web/javascript/reference/global_objects/function/arity/index.html
+++ /dev/null
@@ -1,70 +0,0 @@
----
-title: Function.arity
-slug: Web/JavaScript/Reference/Global_Objects/Function/arity
-translation_of: Archive/Web/JavaScript/Function.arity
----
-<div>{{JSRef}} {{obsolete_header}}</div>
-
-<p class="note">La propietat <code><strong>arity</strong></code> solia retornar el número d'arguments esperats per la funció, tanmateix, ja no existeix i s'ha reemplaçat per la propietat {{jsxref("Function.prototype.length")}}.</p>
-
-<h2 id="Especificacions">Especificacions</h2>
-
-<p>Implementat en JavaScript 1.2. Obsolet en JavaScript 1.4.}</p>
-
-<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<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>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</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>Chrome per 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>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="Vegeu_també">Vegeu també</h2>
-
-<ul>
- <li>{{jsxref("Function.prototype.length")}}</li>
-</ul>
diff --git a/files/ca/web/javascript/reference/global_objects/object/count/index.html b/files/ca/web/javascript/reference/global_objects/object/count/index.html
deleted file mode 100644
index ed84c7006c..0000000000
--- a/files/ca/web/javascript/reference/global_objects/object/count/index.html
+++ /dev/null
@@ -1,82 +0,0 @@
----
-title: Object.prototype.__count__
-slug: Web/JavaScript/Reference/Global_Objects/Object/count
-translation_of: Archive/Web/JavaScript/Object.count
----
-<div>{{JSRef}} {{obsolete_header("2")}}</div>
-
-<p>La propietat <strong><code>__count__</code></strong> s'utilitzava per emmagatzemar el recompte de les propietats enumerables d'un objecte, però s'ha eliminat.</p>
-
-<h2 id="Sintaxi">Sintaxi</h2>
-
-<pre class="syntaxbox"><code><var>obj</var>.__count__</code></pre>
-
-<h2 id="Exemples">Exemples</h2>
-
-<pre class="brush: js">{ 1: 1 }.__count__ // 1
-[].__count__ // 0
-[1].__count__ // 1
-[1, /* hole */, 2, 3].__count__ // 3
-</pre>
-
-<h2 id="Especificacions">Especificacions</h2>
-
-<p>No forma part de cap especificació.</p>
-
-<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<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>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</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>Chrome per 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>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="Vegeu_també">Vegeu també</h2>
-
-<ul>
- <li><a class="external" href="http://whereswalden.com/2010/04/06/more-changes-coming-to-spidermonkey-the-magical-__count__-property-of-objects-is-being-removed/">[Blog post] Més canvis en SpiderMonkey: la propietat màgica  __count__  s'ha eliminat</a></li>
-</ul>
diff --git a/files/ca/web/javascript/reference/global_objects/object/eval/index.html b/files/ca/web/javascript/reference/global_objects/object/eval/index.html
deleted file mode 100644
index 8c43cf423a..0000000000
--- a/files/ca/web/javascript/reference/global_objects/object/eval/index.html
+++ /dev/null
@@ -1,85 +0,0 @@
----
-title: Object.prototype.eval()
-slug: Web/JavaScript/Reference/Global_Objects/Object/eval
-translation_of: Archive/Web/JavaScript/Object.eval
----
-<div>{{JSRef}} {{obsolete_header}}</div>
-
-<p>El mètode <code><strong>Object.eval()</strong></code> solia avaluar una cadena del codi JavaScript en el context d'un objecte, tanmateix, aquest mètode s'ha eliminat.</p>
-
-<h2 id="Sintaxi">Sintaxi</h2>
-
-<pre class="syntaxbox"><code><var>obj</var>.eval(<var>cadena</var>)</code></pre>
-
-<h3 id="Paràmetres">Paràmetres</h3>
-
-<dl>
- <dt><code>cadena</code></dt>
- <dd>Qualsevol cadena que representi una expressió JavaScript, sentència, o una seqüència de sentències. L'expressió pot incloure variables i propietats d'objectes ja existents.</dd>
-</dl>
-
-<h2 id="Descripció">Descripció</h2>
-
-<p>El mètode <code>eval</code> ja no es pot utilitzar com a mètode d'un objecte. Utilitzeu la funció de més alt nivell {{jsxref("Global_Objects/eval", "eval()")}} per aquesta finalitat.</p>
-
-<h2 id="Especificacions">Especificacions</h2>
-
-<p>No forma part de cap especificació.</p>
-
-<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<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>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</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>Chrome per 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>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="Vegeu_també">Vegeu també</h2>
-
-<ul>
- <li>{{jsxref("Global_Objects/eval", "eval()")}}</li>
-</ul>
diff --git a/files/ca/web/javascript/reference/global_objects/object/observe/index.html b/files/ca/web/javascript/reference/global_objects/object/observe/index.html
deleted file mode 100644
index 7059b86cd8..0000000000
--- a/files/ca/web/javascript/reference/global_objects/object/observe/index.html
+++ /dev/null
@@ -1,191 +0,0 @@
----
-title: Object.observe()
-slug: Web/JavaScript/Reference/Global_Objects/Object/observe
-translation_of: Archive/Web/JavaScript/Object.observe
----
-<div>{{JSRef}}</div>
-
-<p>El mètode <strong><code>Object.observe()</code></strong> s'utilitza per observar asincrònicament els canvis en un objecte. Proveeix una corrent de canvis en l'ordre en què es produeixen.</p>
-
-<h2 id="Sintaxi">Sintaxi</h2>
-
-<pre class="syntaxbox"><code>Object.observe(<var>obj</var>, <var>callback</var>[, <var>acceptList</var>])</code></pre>
-
-<h3 id="Paràmetres">Paràmetres</h3>
-
-<dl>
- <dt><code>obj</code></dt>
- <dd>L'objecte que s'observa.</dd>
- <dt><code>callback</code></dt>
- <dd>La funció es crida cada cop que es realitzen canvis, amb l'argument següent:
- <dl>
- <dt><code>changes</code></dt>
- <dd>Un array d'objectes cadascún d'ells representa un canvi. Les propietats d'aquests objectes canvi són:
- <ul>
- <li><strong><code>name</code></strong>: El nom de la propietat que s'ha canviat.</li>
- <li><strong><code>object</code></strong>: L'objecte canviat després d'haverse realitzat els canvis.</li>
- <li><strong><code>type</code></strong>: Una cadena que indica el tipus de canvi que s'ha portat a terme: <code>"add"</code>, <code>"update"</code>, o <code>"delete"</code>.</li>
- <li><strong><code>oldValue</code></strong>: Només pels tipus <code>"update"</code> i <code>"delete"</code>. El valor abans del canvi.</li>
- </ul>
- </dd>
- </dl>
- </dd>
- <dt><code>acceptList</code></dt>
- <dd>La llista de tipus de canvis que s'han d'observar en l'objecte donat  callback. En cas d'ometre's, s'utilitzarà l'array <code>["add", "update", "delete", "reconfigure", "setPrototype", "preventExtensions"]</code>.</dd>
-</dl>
-
-<h2 id="Descripció">Descripció</h2>
-
-<p><code>callback</code> és cridat cada cop que es realitza un canvi a <code>obj</code>, amb un array de tots els canvis en l'ordre en que han succeït.</p>
-
-<h2 id="Exemples">Exemples</h2>
-
-<h3 id="Mostrant_tots_els_sis_tipus_diferents">Mostrant tots els sis tipus diferents</h3>
-
-<pre class="brush: js">var obj = {
- foo: 0,
- bar: 1
-};
-
-Object.observe(obj, function(changes) {
- console.log(changes);
-});
-
-obj.baz = 2;
-// [{name: 'baz', object: &lt;obj&gt;, type: 'add'}]
-
-obj.foo = 'hello';
-// [{name: 'foo', object: &lt;obj&gt;, type: 'update', oldValue: 0}]
-
-delete obj.baz;
-// [{name: 'baz', object: &lt;obj&gt;, type: 'delete', oldValue: 2}]
-
-Object.defineProperty(obj, 'foo', {writable: false});
-// [{name: 'foo', object: &lt;obj&gt;, type: 'reconfigure'}]
-
-Object.setPrototypeOf(obj, {});
-// [{name: '__proto__', object: &lt;obj&gt;, type: 'setPrototype', oldValue: &lt;prototype&gt;}]
-
-Object.seal(obj);
-// [
-// {name: 'foo', object: &lt;obj&gt;, type: 'reconfigure'},
-// {name: 'bar', object: &lt;obj&gt;, type: 'reconfigure'},
-// {object: &lt;obj&gt;, type: 'preventExtensions'}
-// ]
-</pre>
-
-<h3 id="Enllaçar_dades">Enllaçar dades</h3>
-
-<pre class="brush: js">// Un model d'usuari
-var user = {
- id: 0,
- name: 'Brendan Eich',
- title: 'Mr.'
-};
-
-// Crear una benvinguda per l'usuari
-function updateGreeting() {
- user.greeting = 'Hello, ' + user.title + ' ' + user.name + '!';
-}
-updateGreeting();
-
-Object.observe(user, function(changes) {
- changes.forEach(function(change) {
- // Qualsevol canvi de nom del temps o títol, actualitzar la benvinguda
- if (change.name === 'name' || change.name === 'title') {
- updateGreeting();
- }
- });
-});
-</pre>
-
-<h3 id="Tipus_de_canvi_personalitzat">Tipus de canvi personalitzat</h3>
-
-<pre class="brush: js">// Un punt en un pla 2D
-var point = {x: 0, y: 0, distance: 0};
-
-function setPosition(pt, x, y) {
- // Performing a custom change
- Object.getNotifier(pt).performChange('reposition', function() {
- var oldDistance = pt.distance;
- pt.x = x;
- pt.y = y;
- pt.distance = Math.sqrt(x * x + y * y);
- return {oldDistance: oldDistance};
- });
-}
-
-Object.observe(point, function(changes) {
- console.log('Distance change: ' + (point.distance - changes[0].oldDistance));
-}, ['reposition']);
-
-setPosition(point, 3, 4);
-// Distance change: 5
-</pre>
-
-<h2 id="Especificacions">Especificacions</h2>
-
-<p><a href="https://github.com/arv/ecmascript-object-observe">Proposta de Strawman per ECMAScript 7</a>.</p>
-
-<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<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>{{CompatNo}} [1]</td>
- <td>{{CompatNo}} [2]</td>
- <td>{{CompatOpera("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>Chrome per 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>{{CompatChrome("36")}}</td>
- <td>{{CompatNo}} [1]</td>
- <td>{{CompatNo}} [2]</td>
- <td>{{CompatOpera("23")}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>[1]: Vegeu {{bug(800355)}}</p>
-
-<p>[2]: Vegeu rellevant <a href="https://dev.modern.ie/platform/status/objectobserve/">entrada de l'estat de la plataforma MS Edge</a></p>
-
-<h2 id="Vegeu_també">Vegeu també</h2>
-
-<ul>
- <li>{{jsxref("Object.unobserve()")}} {{experimental_inline}}</li>
- <li>{{jsxref("Array.observe()")}} {{experimental_inline}}</li>
-</ul>