Static
animateStart animating the badge with the given characters or predefined character set
Either an array of characters to cycle through or a key from the predefined charsets
Delay between updates in milliseconds (default: 500)
Static
clearStop the badge animation and optionally show a final message
Optional text to display before clearing the badge
How long to show the final text before clearing (in milliseconds)
Static
setSet the colors of the badge
Optional
fgColor: stringThe foreground (text) color of the badge (hex color code)
Optional
bgColor: stringThe background color of the badge (hex color code)
Static
setSet the text of the badge. This also clears the animation
The text to display on the badge
Private
Static
#updateUpdate the badge to the next character in the sequence
A utility class for managing Chrome extension badge animations and styling. Provides methods to animate the badge with different character sets, set colors, and control the animation timing. The badge can be used to show loading states, progress indicators, or other status information in the Chrome extension icon.
Example