From c54683f6ae5564f6dfa1597c81b127a2374418d3 Mon Sep 17 00:00:00 2001 From: Anderson Vallejo <48649209+Vallejoanderson@users.noreply.github.com> Date: Thu, 3 Feb 2022 18:00:16 -0500 Subject: Content sync and updated to md | BatteryManager.charging [ES] (#3974) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Content sync and updated to md * Apply suggestions from code review Co-authored-by: Juan Vásquez * 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 Co-authored-by: Carolyn Wu <87150472+cw118@users.noreply.github.com> Nicely done! Lets merge this PR. --- .../es/web/api/batterymanager/charging/index.html | 28 ---------- files/es/web/api/batterymanager/charging/index.md | 62 ++++++++++++++++++++++ 2 files changed, 62 insertions(+), 28 deletions(-) delete mode 100644 files/es/web/api/batterymanager/charging/index.html create mode 100644 files/es/web/api/batterymanager/charging/index.md (limited to 'files') 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 ---- -

{{ ApiRef() }}

-

Resumen

-

Un valor boleano indicando si o no esta cargando la batería del dispositivo (está conectado el cargador).

-

Sintaxis

-
var charging = navigator.battery.charging
-

Valor de retorno, charging 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 true. De lo contrario el valor es false.

-

Specifications

-

{{page("/en-US/docs/Web/API/BatteryManager","Specifications")}}

-

Browser compatibility

-

{{page("/en-US/docs/Web/API/BatteryManager","Browser_compatibility")}}

-

See also

- 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 +
(estado de carga desconocido)
+``` + +### 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")}} + -- cgit v1.2.3-54-g00ecf