OpenPWA Demo

Badging

Sets a numeric badge on the installed app's icon and clears it again. The call resolves in the browser tab too, but the badge is only drawn on an installed app icon (taskbar, dock, home screen), so install the demo first to see it.

Preconditions

The code being run

Rendered from each function's own source with toString(); the buttons call exactly this.

Set the badge to the counter

Clear the badge

Run

Counter: 0

Reference