Skip to content

Commit

Permalink
Change event to use addListener() and removeListener()
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiliaPaz authored Dec 26, 2023
1 parent a9fe635 commit 5e4e749
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions proposals/action-on-user-settings-changed-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ dictionary UserSettings {
#### Events

```javascript
// Fire when user-specified settings relating to an extension's action changed.
<browser>.action.onUserSettingsChanged(
// Fires when user-specified settings relating to an extension's action changed.
<browser>.action.onUserSettingsChanged.addListener(
callback: function, // where callback looks like: (userSettings: UserSettings) => void
);

// Deregisters the event listener.
<browser>.action.onUserSettingsChanged.removeListener(
callback: function, // where callback looks like: (userSettings: UserSettings) => void
);
```
Expand Down

0 comments on commit 5e4e749

Please sign in to comment.