Skip to content

Commit

Permalink
navigator.getBattery() is not deprecated (#5227)
Browse files Browse the repository at this point in the history
* navigator.getBattery() is not deprecated

* Update files/en-us/web/api/navigator/index.html

Co-authored-by: Joe Medley <jmedley@google.com>

* Fix fixable flaw link

Co-authored-by: Joe Medley <jmedley@google.com>
  • Loading branch information
hamishwillee and jpmedley authored May 25, 2021
1 parent dd77a55 commit d0a20d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 10 additions & 10 deletions files/en-us/web/api/navigator/getbattery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
title: Navigator.getBattery()
slug: Web/API/Navigator/getBattery
tags:
- API
- Battery API
- Device API
- Method
- Navigator
- Reference
- getBattery
- API
- Battery API
- Device API
- Method
- Navigator
- Reference
- getBattery
---
<div>{{ ApiRef("Battery API") }}{{deprecated_header}}</div>
<div>{{ ApiRef("Battery API") }}</div>

<p>The <strong><code>getBattery()</code></strong> method provides information about the
system's battery. It returns a battery promise, which is resolved in a
{{domxref("BatteryManager")}} object providing also some new events you can handle to
monitor the battery status. This implements the <a
href="/en-US/docs/WebAPI/Battery_Status">Battery Status API</a>; see that
href="/en-US/docs/Web/API/Battery_Status_API">Battery Status API</a>; see that
documentation for additional details, a guide to using the API, and sample code.</p>

<div class="notecard note">
Expand Down Expand Up @@ -103,7 +103,7 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/WebAPI/Battery_Status">Battery Status API</a></li>
<li><a href="/en-US/docs/Web/API/Battery_Status_API">Battery Status API</a></li>
<li><code>Feature-Policy</code> {{HTTPHeader("Feature-Policy/battery", "battery")}}
feature</li>
</ul>
2 changes: 2 additions & 0 deletions files/en-us/web/api/navigator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ <h2 id="Methods">Methods</h2>
<dd>Returns <code>true</code> if a call to <code>Navigator.share()</code> would succeed.</dd>
<dt>{{domxref("Navigator.clearAppBadge()")}}</dt>
<dd>Clears a badge on the current app's icon and returns a {{jsxref("Promise")}} that resolves with {{jsxref("undefined")}}.</dd>
<dt>{{domxref("Navigator.getBattery()")}}</dt>
<dd>Returns a promise that resolves with a {{domxref("BatteryManager")}} object that returns information about the battery charging status.</dd>
<dt>{{domxref("Navigator.registerProtocolHandler()")}}</dt>
<dd>Allows web sites to register themselves as a possible handler for a given protocol.</dd>
<dt>{{domxref("Navigator.requestMediaKeySystemAccess()")}}</dt>
Expand Down

0 comments on commit d0a20d2

Please sign in to comment.