-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Bug-1828220 add documentation and release notes for browser_action.onUserSettingsChanged event #40488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rebloor
merged 5 commits into
mdn:main
from
rebloor:Bug-1828220-add-browser_action.onUserSettingsChanged-event
Aug 9, 2025
Merged
Bug-1828220 add documentation and release notes for browser_action.onUserSettingsChanged event #40488
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7ec8d13
Bug-1828220 add the browser_action.onUserSettingsChanged event
rebloor 940489f
Addition event to action API
rebloor 194a015
Apply linter suggestions
rebloor 3898499
Release note correction
rebloor dc1e4c0
Merge branch 'Bug-1828220-add-browser_action.onUserSettingsChanged-ev…
rebloor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
.../mozilla/add-ons/webextensions/api/browseraction/onusersettingschanged/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: browserAction.onUserSettingsChanged | ||
slug: Mozilla/Add-ons/WebExtensions/API/browserAction/onUserSettingsChanged | ||
page-type: webextension-api-event | ||
browser-compat: webextensions.api.browserAction.onUserSettingsChanged | ||
sidebar: addonsidebar | ||
--- | ||
|
||
Fired when a change occurs in the user-specified settings that affect an extension's browser action. | ||
|
||
## Syntax | ||
|
||
```js-nolint | ||
browser.browserAction.onUserSettingsChanged.addListener(listener) | ||
browser.browserAction.onUserSettingsChanged.removeListener(listener) | ||
browser.browserAction.onUserSettingsChanged.hasListener(listener) | ||
``` | ||
|
||
Events have three functions: | ||
|
||
- `addListener(listener)` | ||
- : Adds a listener to this event. | ||
- `removeListener(listener)` | ||
- : Stop listening to this event. The `listener` argument is the listener to remove. | ||
- `hasListener(listener)` | ||
- : Check whether `listener` is registered for this event. Returns `true` if it is listening, `false` otherwise. | ||
|
||
## addListener syntax | ||
|
||
### Parameters | ||
|
||
- `listener` | ||
- : The function called when this event occurs. The function is passed these arguments: | ||
- `change` | ||
- : 'object'. Details of the changed user-specified settings. | ||
rebloor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- `isOnToolbar` | ||
- : `boolean`. Whether the extension's browser action icon is visible on the top-level toolbar of the browser windows (i.e., whether the extension has been 'pinned' by the user). | ||
|
||
|
||
rebloor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{{WebExtExamples}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.