Proposal: A persistOnNavigation property for the action API #480
Labels
follow-up: chrome
Needs a response from a Chrome representative
proposal
Proposal for a change or new feature
supportive: firefox
Supportive from Firefox
supportive: safari
Supportive from Safari
Context
From an active Chromium issue, reported by @ericlaw1979 (Microsoft).
When an extension calls action.setTitle, setIcon, setBadgeText, setBadgeTextColor and setBadgeBackgroundColor for a specific tab, these values are automatically reset back to their default values on every navigation.
This behavior is undesirable in most cases; fixing it requires constantly calling these APIs again, and doing so results in a flicker as the icon changes from the default back to the desired icon.
This necessitates using webNavigation.onCommitted or tabs.onUpdated to re-apply the desired action icon, badge color, badge text, etc. These are high frequency events which means the background script is chronically on or loads frequently.
Proposal
Initial proposal by @wOxxOm from the same Chromium issue.
Add a parameter like
persistOnNavigation
. If enabled, the icon, badge text/color won't reset on navigation. This maintains background compatibility, but makes it optional.The text was updated successfully, but these errors were encountered: