Skip to content

Commit 15c5a2d

Browse files
Closure Teamcopybara-github
Closure Team
authored andcommitted
Add externs for Badging (www.w3.org/TR/badging/).
PiperOrigin-RevId: 634004953
1 parent ac3238e commit 15c5a2d

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

externs/browser/html5.js

+51
Original file line numberDiff line numberDiff line change
@@ -5581,6 +5581,25 @@ HTMLMeterElement.prototype.optimum;
55815581
HTMLMeterElement.prototype.labels;
55825582

55835583

5584+
/**
5585+
* @interface
5586+
* @see https://www.w3.org/TR/badging/
5587+
*/
5588+
function NavigatorBadge() {};
5589+
5590+
/**
5591+
* @see https://www.w3.org/TR/badging/#setappbadge-method
5592+
* @param {number=} contents
5593+
* @return {Promise<undefined>}
5594+
*/
5595+
NavigatorBadge.prototype.setAppBadge = function(contents) {};
5596+
5597+
/**
5598+
* @see https://www.w3.org/TR/badging/#clearappbadge-method
5599+
* @return {Promise<undefined>}
5600+
*/
5601+
NavigatorBadge.prototype.clearAppBadge = function() {};
5602+
55845603
/**
55855604
* @interface
55865605
* @see https://storage.spec.whatwg.org/#api
@@ -5594,6 +5613,7 @@ NavigatorStorage.prototype.storage;
55945613

55955614
/**
55965615
* @constructor
5616+
* @implements NavigatorBadge
55975617
* @implements NavigatorStorage
55985618
* @see https://www.w3.org/TR/html5/webappapis.html#navigator
55995619
*/
@@ -5759,8 +5779,24 @@ Navigator.prototype.userActivation;
57595779
*/
57605780
Navigator.prototype.webdriver;
57615781

5782+
/**
5783+
* @see https://www.w3.org/TR/badging/#setappbadge-method
5784+
* @param {number=} contents
5785+
* @return {Promise<undefined>}
5786+
* @override
5787+
*/
5788+
Navigator.prototype.setAppBadge = function(contents) {};
5789+
5790+
/**
5791+
* @see https://www.w3.org/TR/badging/#clearappbadge-method
5792+
* @return {Promise<undefined>}
5793+
* @override
5794+
*/
5795+
Navigator.prototype.clearAppBadge = function() {};
5796+
57625797
/**
57635798
* @constructor
5799+
* @implements NavigatorBadge
57645800
* @implements NavigatorStorage
57655801
* @see https://html.spec.whatwg.org/multipage/workers.html#the-workernavigator-object
57665802
*/
@@ -5785,6 +5821,21 @@ WorkerNavigator.prototype.hardwareConcurrency;
57855821
*/
57865822
WorkerNavigator.prototype.storage;
57875823

5824+
/**
5825+
* @see https://www.w3.org/TR/badging/#setappbadge-method
5826+
* @param {number=} contents
5827+
* @return {Promise<undefined>}
5828+
* @override
5829+
*/
5830+
WorkerNavigator.prototype.setAppBadge = function(contents) {};
5831+
5832+
/**
5833+
* @see https://www.w3.org/TR/badging/#clearappbadge-method
5834+
* @return {Promise<undefined>}
5835+
* @override
5836+
*/
5837+
WorkerNavigator.prototype.clearAppBadge = function() {};
5838+
57885839
/**
57895840
* @record
57905841
* @see https://wicg.github.io/web-share/#sharedata-dictionary

0 commit comments

Comments
 (0)