Use async/await on background
This commit is contained in:
parent
88238005ab
commit
48e4bccf0d
12 changed files with 273 additions and 316 deletions
|
@ -56,13 +56,12 @@ export default class BackgroundComponent {
|
|||
}
|
||||
}
|
||||
|
||||
broadcastSettingsChanged() {
|
||||
return browser.tabs.query({}).then((tabs) => {
|
||||
for (let tab of tabs) {
|
||||
browser.tabs.sendMessage(tab.id, {
|
||||
type: messages.SETTINGS_CHANGED,
|
||||
});
|
||||
}
|
||||
});
|
||||
async broadcastSettingsChanged() {
|
||||
let tabs = await browser.tabs.query({});
|
||||
for (let tab of tabs) {
|
||||
browser.tabs.sendMessage(tab.id, {
|
||||
type: messages.SETTINGS_CHANGED,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue