aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/javascript/reference/statements
diff options
context:
space:
mode:
authorYujiSoftware <yuji.software+github@gmail.com>2022-03-03 22:36:23 +0900
committerGitHub <noreply@github.com>2022-03-03 07:36:23 -0600
commit0ce7202a706c9036eeea42c158f433c2b7940457 (patch)
tree4e952b5472e3140bd12ac07e77df3aa47e79b60f /files/es/web/javascript/reference/statements
parent581e6fb5827a5450e295c91250dd0563a3c9251a (diff)
downloadtranslated-content-0ce7202a706c9036eeea42c158f433c2b7940457.tar.gz
translated-content-0ce7202a706c9036eeea42c158f433c2b7940457.tar.bz2
translated-content-0ce7202a706c9036eeea42c158f433c2b7940457.zip
Migrate CompatibilityTable to Compat macro (es) (#4355)
* Migrate CompatibilityTable to Compat macro (es) * Migrate to multiple Compat macro (es)
Diffstat (limited to 'files/es/web/javascript/reference/statements')
-rw-r--r--files/es/web/javascript/reference/statements/class/index.html70
-rw-r--r--files/es/web/javascript/reference/statements/debugger/index.html50
-rw-r--r--files/es/web/javascript/reference/statements/empty/index.html50
-rw-r--r--files/es/web/javascript/reference/statements/for...of/index.html59
-rw-r--r--files/es/web/javascript/reference/statements/function_star_/index.html94
-rw-r--r--files/es/web/javascript/reference/statements/let/index.html2
-rw-r--r--files/es/web/javascript/reference/statements/switch/index.html25
7 files changed, 8 insertions, 342 deletions
diff --git a/files/es/web/javascript/reference/statements/class/index.html b/files/es/web/javascript/reference/statements/class/index.html
index 107c0ab32c..80c8f080d0 100644
--- a/files/es/web/javascript/reference/statements/class/index.html
+++ b/files/es/web/javascript/reference/statements/class/index.html
@@ -70,75 +70,7 @@ class Square extends Polygon {
<h2 id="Compatibilidad_en_navegadores">Compatibilidad en navegadores</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>Soporte básico</td>
- <td>{{CompatChrome(42.0)}}</td>
- <td>{{CompatGeckoDesktop(45)}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- <tr>
- <td>Array subclassing</td>
- <td>{{CompatChrome(43.0)}}</td>
- <td>{{CompatNo}}</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>Android</th>
- <th>Android Webview</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- <th>Chrome para Android</th>
- </tr>
- <tr>
- <td>Soporte básico</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatChrome(42.0)}}</td>
- <td>{{CompatGeckoMobile(45)}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatChrome(42.0)}}</td>
- </tr>
- <tr>
- <td>Array subclassing</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatChrome(43.0)}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatChrome(43.0)}}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat("javascript.statements.class")}}
<h2 id="Ver_también">Ver también</h2>
diff --git a/files/es/web/javascript/reference/statements/debugger/index.html b/files/es/web/javascript/reference/statements/debugger/index.html
index 2560e7d99c..9d68894855 100644
--- a/files/es/web/javascript/reference/statements/debugger/index.html
+++ b/files/es/web/javascript/reference/statements/debugger/index.html
@@ -68,55 +68,7 @@ original_slug: Web/JavaScript/Referencia/Sentencias/debugger
<h2 id="Compatibilidad_con_navegadores">Compatibilidad con navegadores</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>Soporte básico</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Característica</th>
- <th>Android</th>
- <th>Chrome para Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Soporte básico</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat("javascript.statements.debugger")}}
<h2 id="Vea_también">Vea también</h2>
diff --git a/files/es/web/javascript/reference/statements/empty/index.html b/files/es/web/javascript/reference/statements/empty/index.html
index d35f3ba504..95932a71d7 100644
--- a/files/es/web/javascript/reference/statements/empty/index.html
+++ b/files/es/web/javascript/reference/statements/empty/index.html
@@ -85,55 +85,7 @@ console.log(b); // 0</pre>
<h2 id="Compatibilidad_en_Navegadores">Compatibilidad en Navegadores</h2>
-<p>{{CompatibilityTable}}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat("javascript.statements.empty")}}
<h2 id="Vea_también">Vea también</h2>
diff --git a/files/es/web/javascript/reference/statements/for...of/index.html b/files/es/web/javascript/reference/statements/for...of/index.html
index b89cf6fa23..4fec8dd430 100644
--- a/files/es/web/javascript/reference/statements/for...of/index.html
+++ b/files/es/web/javascript/reference/statements/for...of/index.html
@@ -253,64 +253,7 @@ for (let i of arr) {
<h2 id="Compatibilidad_de_navegadores">Compatibilidad de navegadores</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>Edge</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Soporte básico</td>
- <td>{{CompatChrome(38)}} <a href="##Chrome_note_1">[1]</a><br>
- {{CompatChrome(51)}} <a href="##Chrome_note_3">[3]</a></td>
- <td>{{CompatGeckoDesktop("13")}} <a href="##Gecko_note_2">[2]</a> <a href="##Chrome_note_4">[4]</a></td>
- <td>12</td>
- <td>25</td>
- <td>7.1</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Característica</th>
- <th>Android</th>
- <th>Chrome for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Soporte básico</td>
- <td>5.1</td>
- <td>{{CompatChrome(38)}} <a href="https://developer.mozilla.org/es/docs/Web/JavaScript/Referencia/Sentencias/for...of$edit#Chrome_note_1">[1]</a></td>
- <td>{{CompatGeckoMobile("13")}} <a href="https://developer.mozilla.org/es/docs/Web/JavaScript/Referencia/Sentencias/for...of$edit#Gecko_note_2">[2]</a></td>
- <td>{{CompatNo}}</td>
- <td>{{CompatUnknown}}</td>
- <td>8</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p><a id="#Chrome_note_1" name="#Chrome_note_1">[1]</a> Desde Chrome 29 a Chrome 37 esta funcionalidad estuvo disponible al activar la opción chrome://flags/#enable-javascript-harmony: “JavaScript experimental”.</p>
-
-<p><a id="#Gecko_note_2" name="#Gecko_note_2">[2]</a> Antes de Firefox 51, el uso de <code>for...of usando</code> {{jsxref("const")}}<code> resultaba en un</code> {{jsxref("SyntaxError")}} ("missing = in const declaration"). El problema ha sido resuelto ({{bug(1101653)}}).</p>
-
-<p><a id="#Chrome_note_3" name="#Chrome_note_3">[3]</a> Chrome 51 añadió soporte para iterar objetos.</p>
-
-<p><a id="#Chrome_note_4" name="#Chrome_note_4">[4]</a> Firefox aún permite el uso de un generador después de haber interrumpido el bucle {{Bug(1147371)}}. Como se vio más arriba, <a href="##re-use">no se deben reutilizar los generadores</a>.</p>
+{{Compat("javascript.statements.for_of")}}
<h2 id="Vea_también">Vea también</h2>
diff --git a/files/es/web/javascript/reference/statements/function_star_/index.html b/files/es/web/javascript/reference/statements/function_star_/index.html
index d44d3f50af..a3df2cd216 100644
--- a/files/es/web/javascript/reference/statements/function_star_/index.html
+++ b/files/es/web/javascript/reference/statements/function_star_/index.html
@@ -108,99 +108,7 @@ console.log(gen.next().value); // 20
<h2 id="Compatibilidad_con_navegadores">Compatibilidad con navegadores</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 (WebKit)</th>
- </tr>
- <tr>
- <td>Soporte básico</td>
- <td>{{CompatChrome(39.0)}}</td>
- <td>{{CompatGeckoDesktop("26.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>26</td>
- <td>{{CompatNo}}</td>
- </tr>
- <tr>
- <td><code>yield*</code></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoDesktop("27.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>26</td>
- <td>{{CompatNo}}</td>
- </tr>
- <tr>
- <td><code>IteratorResult</code> object instead of throwing</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoDesktop("29.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatVersionUnknown}}</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 for Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Soporte básico</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatChrome(39.0)}}</td>
- <td>{{CompatGeckoMobile("26.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- <tr>
- <td><code>yield*</code></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoMobile("27.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- <tr>
- <td><code>IteratorResult</code> object instead of throwing</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoMobile("29.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h3 id="Notas_específicas_de_Firefox">Notas específicas de Firefox</h3>
-
-<h4 id="Generadores_e_iteradores_en_versiones_de_Firefox_anteriores_a_26">Generadores e iteradores en versiones de Firefox anteriores a 26</h4>
-
-<p>Las versiones anteriores de FireFox implementan así mismo una versión anterior de la propuesta de generadores. En la versión anterior, los generadores eran definidos utilizando la declaración <code>function</code> de una manera regular (Sin asterisco).  Véase <a href="/en-US/docs/Web/JavaScript/Reference/Statements/Legacy_generator_function">Legacy generator function </a>para mayor información.</p>
-
-<h4 id="IteratorResult_object_returned_instead_of_throwing"><code>IteratorResult</code> object returned instead of throwing</h4>
-
-<p>Starting with Gecko 29 {{geckoRelease(29)}}, the completed generator function no longer throws a {{jsxref("TypeError")}} "generator has already finished". Instead, it returns an <code>IteratorResult</code> object like <code>{ value: undefined, done: true }</code> ({{bug(958951)}}).</p>
+{{Compat("javascript.statements.generator_function")}}
<h2 id="Ver_también">Ver también</h2>
diff --git a/files/es/web/javascript/reference/statements/let/index.html b/files/es/web/javascript/reference/statements/let/index.html
index 872bd15a48..009597401d 100644
--- a/files/es/web/javascript/reference/statements/let/index.html
+++ b/files/es/web/javascript/reference/statements/let/index.html
@@ -274,6 +274,8 @@ console.log(a); // 5</pre>
<h2 id="Compatibilidad_en_navegadores">Compatibilidad en navegadores</h2>
+{{Compat("javascript.statements.let")}}
+
<h2 id="CompatibilityTable"><span style="font-size: 14px; font-weight: normal; line-height: 1.5;">{{CompatibilityTable}}</span></h2>
<div id="compat-desktop">
diff --git a/files/es/web/javascript/reference/statements/switch/index.html b/files/es/web/javascript/reference/statements/switch/index.html
index 29c5a63f93..e7aa75a625 100644
--- a/files/es/web/javascript/reference/statements/switch/index.html
+++ b/files/es/web/javascript/reference/statements/switch/index.html
@@ -214,30 +214,7 @@ switch (foo) {
<h2 id="Compatibilidad_en_Navegadores">Compatibilidad en Navegadores</h2>
-<p>{{CompatibilityTable}}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat("javascript.statements.switch")}}
<h2 id="Ver_también">Ver también</h2>