Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/setextensionactionoptions/index.md
6579 views
------{{AddonSidebar()}}
Configures whether the action count for tabs is displayed as the extension action's badge text and provides a way for the action count to be incremented.
Syntax
Parameters
extensionActionOptions: An object containing the configuration details for the action count for tabs.
displayActionCountAsBadgeText{{optional_inline}}:
booleanWhether to automatically display the action count for a page as the extension's badge text. This preference persists across sessions.
tabUpdate{{optional_inline}}:
object. Details of how the tab's action count should be adjusted. See the tabUpdate section for more details.
Additional objects
tabUpdate
increment:
numberThe amount to increment the tab's action count by. Negative values decrement the count.
tabId:
numberThe tab to update the action count for.
Return value
A Promise that fulfills with no arguments. If the request fails, the promise is rejected with an error message.
Examples
{{WebExtExamples}}
Browser compatibility
{{Compat}}