From ecdf8324bd5be5bfb45d028b62120186e22c1096 Mon Sep 17 00:00:00 2001
From: Hamish Willee
Date: Mon, 24 May 2021 11:26:01 +1000
Subject: [PATCH 1/3] navigator.getBattery() is not deprecated
---
files/en-us/web/api/navigator/getbattery/index.html | 2 +-
files/en-us/web/api/navigator/index.html | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/files/en-us/web/api/navigator/getbattery/index.html b/files/en-us/web/api/navigator/getbattery/index.html
index 50a8c4fd521dd97..46281655e203866 100644
--- a/files/en-us/web/api/navigator/getbattery/index.html
+++ b/files/en-us/web/api/navigator/getbattery/index.html
@@ -10,7 +10,7 @@
- Reference
- getBattery
---
-{{ ApiRef("Battery API") }}{{deprecated_header}}
+{{ ApiRef("Battery API") }}
The getBattery()
method provides information about the
system's battery. It returns a battery promise, which is resolved in a
diff --git a/files/en-us/web/api/navigator/index.html b/files/en-us/web/api/navigator/index.html
index c27dcc0901c4493..eb0288e8ad6a89b 100644
--- a/files/en-us/web/api/navigator/index.html
+++ b/files/en-us/web/api/navigator/index.html
@@ -134,6 +134,8 @@
Methods
Returns true
if a call to Navigator.share()
would succeed.
{{domxref("Navigator.clearAppBadge()")}}
Clears a badge on the current app's icon and returns a {{jsxref("Promise")}} that resolves with {{jsxref("undefined")}}.
+ {{domxref("Navigator.getBattery()")}}
+ Returns a promise that resolves to a {{domxref("BatteryManager")}} object that you can use to get information about the battery charging status.
{{domxref("Navigator.registerProtocolHandler()")}}
Allows web sites to register themselves as a possible handler for a given protocol.
{{domxref("Navigator.requestMediaKeySystemAccess()")}}
From e53eb54610e599df9fa0a7556716978dfb5be862 Mon Sep 17 00:00:00 2001
From: Hamish Willee
Date: Tue, 25 May 2021 10:28:26 +1000
Subject: [PATCH 2/3] Update files/en-us/web/api/navigator/index.html
Co-authored-by: Joe Medley
---
files/en-us/web/api/navigator/index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/files/en-us/web/api/navigator/index.html b/files/en-us/web/api/navigator/index.html
index eb0288e8ad6a89b..ff978d186a2b7d7 100644
--- a/files/en-us/web/api/navigator/index.html
+++ b/files/en-us/web/api/navigator/index.html
@@ -135,7 +135,7 @@ Methods
{{domxref("Navigator.clearAppBadge()")}}
Clears a badge on the current app's icon and returns a {{jsxref("Promise")}} that resolves with {{jsxref("undefined")}}.
{{domxref("Navigator.getBattery()")}}
- Returns a promise that resolves to a {{domxref("BatteryManager")}} object that you can use to get information about the battery charging status.
+ Returns a promise that resolves with a {{domxref("BatteryManager")}} object that returns information about the battery charging status.
{{domxref("Navigator.registerProtocolHandler()")}}
Allows web sites to register themselves as a possible handler for a given protocol.
{{domxref("Navigator.requestMediaKeySystemAccess()")}}
From 5649bd267575c5b07f7faf40e2546a02ba74d499 Mon Sep 17 00:00:00 2001
From: Hamish Willee
Date: Tue, 25 May 2021 10:32:18 +1000
Subject: [PATCH 3/3] Fix fixable flaw link
---
.../web/api/navigator/getbattery/index.html | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/files/en-us/web/api/navigator/getbattery/index.html b/files/en-us/web/api/navigator/getbattery/index.html
index 46281655e203866..6f6032a41a7ba89 100644
--- a/files/en-us/web/api/navigator/getbattery/index.html
+++ b/files/en-us/web/api/navigator/getbattery/index.html
@@ -2,13 +2,13 @@
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
---
{{ ApiRef("Battery API") }}
@@ -16,7 +16,7 @@
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 Battery Status API; see that
+ href="/en-US/docs/Web/API/Battery_Status_API">Battery Status API; see that
documentation for additional details, a guide to using the API, and sample code.
@@ -103,7 +103,7 @@
Browser compatibility
See also