Skip to content

Commit

Permalink
Add externs for Badging (www.w3.org/TR/badging/).
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 634004953
  • Loading branch information
Closure Team authored and copybara-github committed May 15, 2024
1 parent ac3238e commit 15c5a2d
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions externs/browser/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -5581,6 +5581,25 @@ HTMLMeterElement.prototype.optimum;
HTMLMeterElement.prototype.labels;


/**
* @interface
* @see https://www.w3.org/TR/badging/
*/
function NavigatorBadge() {};

/**
* @see https://www.w3.org/TR/badging/#setappbadge-method
* @param {number=} contents
* @return {Promise<undefined>}
*/
NavigatorBadge.prototype.setAppBadge = function(contents) {};

/**
* @see https://www.w3.org/TR/badging/#clearappbadge-method
* @return {Promise<undefined>}
*/
NavigatorBadge.prototype.clearAppBadge = function() {};

/**
* @interface
* @see https://storage.spec.whatwg.org/#api
Expand All @@ -5594,6 +5613,7 @@ NavigatorStorage.prototype.storage;

/**
* @constructor
* @implements NavigatorBadge
* @implements NavigatorStorage
* @see https://www.w3.org/TR/html5/webappapis.html#navigator
*/
Expand Down Expand Up @@ -5759,8 +5779,24 @@ Navigator.prototype.userActivation;
*/
Navigator.prototype.webdriver;

/**
* @see https://www.w3.org/TR/badging/#setappbadge-method
* @param {number=} contents
* @return {Promise<undefined>}
* @override
*/
Navigator.prototype.setAppBadge = function(contents) {};

/**
* @see https://www.w3.org/TR/badging/#clearappbadge-method
* @return {Promise<undefined>}
* @override
*/
Navigator.prototype.clearAppBadge = function() {};

/**
* @constructor
* @implements NavigatorBadge
* @implements NavigatorStorage
* @see https://html.spec.whatwg.org/multipage/workers.html#the-workernavigator-object
*/
Expand All @@ -5785,6 +5821,21 @@ WorkerNavigator.prototype.hardwareConcurrency;
*/
WorkerNavigator.prototype.storage;

/**
* @see https://www.w3.org/TR/badging/#setappbadge-method
* @param {number=} contents
* @return {Promise<undefined>}
* @override
*/
WorkerNavigator.prototype.setAppBadge = function(contents) {};

/**
* @see https://www.w3.org/TR/badging/#clearappbadge-method
* @return {Promise<undefined>}
* @override
*/
WorkerNavigator.prototype.clearAppBadge = function() {};

/**
* @record
* @see https://wicg.github.io/web-share/#sharedata-dictionary
Expand Down

0 comments on commit 15c5a2d

Please sign in to comment.