aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/api
diff options
context:
space:
mode:
authorAnderson Vallejo <48649209+Vallejoanderson@users.noreply.github.com>2022-02-03 18:00:16 -0500
committerGitHub <noreply@github.com>2022-02-03 17:00:16 -0600
commitc54683f6ae5564f6dfa1597c81b127a2374418d3 (patch)
tree99958ebebb0b7a706b47068f89e9c4436439b1a9 /files/es/web/api
parent2405a5f6bed29b43262f3dd6d0634d9141ccc494 (diff)
downloadtranslated-content-c54683f6ae5564f6dfa1597c81b127a2374418d3.tar.gz
translated-content-c54683f6ae5564f6dfa1597c81b127a2374418d3.tar.bz2
translated-content-c54683f6ae5564f6dfa1597c81b127a2374418d3.zip
Content sync and updated to md | BatteryManager.charging [ES] (#3974)
* Content sync and updated to md * Apply suggestions from code review Co-authored-by: Juan Vásquez <juan@logicalbricks.com> * Update files/es/web/api/batterymanager/charging/index.md Co-authored-by: Carolyn Wu <87150472+cw118@users.noreply.github.com> Co-authored-by: Juan Vásquez <juan@logicalbricks.com> Co-authored-by: Carolyn Wu <87150472+cw118@users.noreply.github.com> Nicely done! Lets merge this PR.
Diffstat (limited to 'files/es/web/api')
-rw-r--r--files/es/web/api/batterymanager/charging/index.html28
-rw-r--r--files/es/web/api/batterymanager/charging/index.md62
2 files changed, 62 insertions, 28 deletions
diff --git a/files/es/web/api/batterymanager/charging/index.html b/files/es/web/api/batterymanager/charging/index.html
deleted file mode 100644
index 8295785a2c..0000000000
--- a/files/es/web/api/batterymanager/charging/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: BatteryManager.charging
-slug: Web/API/BatteryManager/charging
-tags:
- - Apps
- - Batería
- - Battery
- - Firefox OS
- - Mobile
- - Móvil
- - WebAPI
-translation_of: Web/API/BatteryManager/charging
----
-<p>{{ ApiRef() }}</p>
-<h2 id="Summary" name="Summary">Resumen</h2>
-<p>Un valor boleano indicando si o no esta cargando la batería del dispositivo (está conectado el cargador).</p>
-<h2 id="Syntax" name="Syntax">Sintaxis</h2>
-<pre class="syntaxbox">var <em>charging</em> = navigator.battery.charging</pre>
-<p>Valor de retorno, <code>charging</code> indica si o no la batería esta siendo cargada; si la batería se está cargando (o si no hay batería), este valor es <code>true</code>. De lo contrario el valor es <code>false</code>.</p>
-<h2 id="Specifications">Specifications</h2>
-<p>{{page("/en-US/docs/Web/API/BatteryManager","Specifications")}}</p>
-<h2 id="Browser_compatibility">Browser compatibility</h2>
-<p>{{page("/en-US/docs/Web/API/BatteryManager","Browser_compatibility")}}</p>
-<h2 id="See_also">See also</h2>
-<ul>
- <li>{{domxref("BatteryManager")}}</li>
- <li>{{domxref("window.navigator.battery","navigator.battery")}}</li>
-</ul>
diff --git a/files/es/web/api/batterymanager/charging/index.md b/files/es/web/api/batterymanager/charging/index.md
new file mode 100644
index 0000000000..9767de19bb
--- /dev/null
+++ b/files/es/web/api/batterymanager/charging/index.md
@@ -0,0 +1,62 @@
+---
+title: BatteryManager.charging
+slug: Web/API/BatteryManager/charging
+tags:
+ - Apps
+ - Batería
+ - Battery
+ - Firefox OS
+ - Mobile
+ - Móvil
+ - WebAPI
+translation_of: Web/API/BatteryManager/charging
+browser-compat: api.BatteryManager.charging
+---
+{{deprecated_header}}{{APIRef("Battery API")}}
+
+Un valor boleano indicando si está cargando o no la batería del dispositivo (está conectado el cargador).
+
+## Sintaxis
+
+```js
+var cargando = battery.charging
+```
+
+El valor de retorno, `cargando` indica si la `battery` se está cargando o no, el cual es un objeto {{domxref("BatteryManager")}}, está actualmente cargandose, si la batería se está cargando, este valor es `true`. De lo contrario el valor es `false`.
+
+## Ejemplo
+
+### Contenido HTML
+
+```html
+<div id="cargando">(estado de carga desconocido)</div>
+```
+
+### Contenido JavaScript
+
+```js
+navigator.getBattery().then(function(battery) {
+
+ var cargando = battery.charging;
+
+ document.querySelector('#cargando').textContent = cargando;
+});
+```
+
+### Resultado
+
+{{EmbedLiveSample('', '100%', 30)}}
+
+## Especificaciones
+
+{{Specifications}}
+
+## Compatibilidad del Navegador
+
+{{Compat}}
+
+## Ver también
+
+- {{domxref("BatteryManager")}}
+- {{domxref("Navigator.getBattery")}}
+