-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Converted pt-BR/docs/web/api/batterymanager/dischargingtimecha… #7243
chore: Converted pt-BR/docs/web/api/batterymanager/dischargingtimecha… #7243
Conversation
Preview URLsFlawsURL:
External URLsURL: No new external URLs (this comment was updated 2022-08-18 11:14:12.547624) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obrigado pela contribuição @nathipg!!
Fiz algumas sugestões com o objetivo de ajustar alguns typos e também atualizar o conteúdo em relação a versão em inglês
👍🏽
title: BatteryManager.ondischargingtimechange | ||
slug: Web/API/BatteryManager/dischargingtimechange_event | ||
tags: | ||
- API | ||
- Battery API | ||
- Event Handler | ||
- Propriedade | ||
- Referencia | ||
translation_of: Web/API/BatteryManager/ondischargingtimechange | ||
original_slug: Web/API/BatteryManager/ondischargingtimechange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: BatteryManager.ondischargingtimechange | |
slug: Web/API/BatteryManager/dischargingtimechange_event | |
tags: | |
- API | |
- Battery API | |
- Event Handler | |
- Propriedade | |
- Referencia | |
translation_of: Web/API/BatteryManager/ondischargingtimechange | |
original_slug: Web/API/BatteryManager/ondischargingtimechange | |
title: 'BatteryManager: dischargingtimechange event' | |
slug: Web/API/BatteryManager/dischargingtimechange_event | |
page-type: web-api-event | |
tags: | |
- API | |
- Event | |
- Reference | |
browser-compat: api.BatteryManager.dischargingtimechange_event | |
translation_of: Web/API/BatteryManager/ondischargingtimechange |
|
||
{{APIRef("Battery API")}} | ||
|
||
Especifica um _event listener_ para receber eventos {{event("dischargingtimechange")}}. Esses eventos ocorrem quando a propriedade {{domxref("BatteryManager.dischargingTime","dischargingTime")}} (tempo de descarregamento) da bateria é atualizada. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Especifica um _event listener_ para receber eventos {{event("dischargingtimechange")}}. Esses eventos ocorrem quando a propriedade {{domxref("BatteryManager.dischargingTime","dischargingTime")}} (tempo de descarregamento) da bateria é atualizada. | |
O evento **`dischargingtimechange`** da [API de status da bateria](/pt-BR/docs/Web/API/Battery_Status_API) é acionado quando a bateria {{domxref("BatteryManager.dischargingTime","dischargingTime")} } é atualizada. |
…argingtimechange_event-md
## Veja também | ||
|
||
- {{domxref("BatteryManager")}} | ||
- {{domxref("Navigator.battery")}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Veja também | |
- {{domxref("BatteryManager")}} | |
- {{domxref("Navigator.battery")}} | |
## Veja também | |
- {{domxref("BatteryManager")}} | |
- {{domxref("Navigator.getBattery")}} |
## Sintaxe | ||
|
||
navigator.battery.ondischargingtimechange = funcRef | ||
|
||
Onde `funcRef` é uma função para ser chamada quando o evento {{event("dischargingtimechange")}} ocorre. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essa parte aqui eu não consigo adicionar a sugestão como as demais porque a formatação da página se confunde com o código..
## Sintaxe Use o nome do evento em métodos como {{domxref("EventTarget.addEventListener", "addEventListener()")}} ou defina uma propriedade do manipulador de eventos. ```js addEventListener('dischargingtimechange', (event) => { }); ondischargingtimechange = (event) => { }; ``` ## Tipo de evento _Um {{domxref("Evento")}} genérico._ ## Exemplo ### Conteúdo HTML ```html(nível de bateria desconhecido)(tempo de carregamento desconhecido)``` ### Conteúdo JavaScript ```js navigator.getBattery().then((battery) => { battery.ondischargingtimechange = () => { document.querySelector('#level').textContent = battery.level; document.querySelector('#chargingTime').textContent = battery.chargingTime; } }); ``` {{ EmbedLiveSample('Example', '100%', 40) }}
…argingtimechange_event-md
…argingtimechange_event-md
…argingtimechange_event-md
subsumed by work on #7950 |
…nge_event to MD