Bug 1287007 - Mark all browserAction methods as async r=billm
E.g. browser.browserAction.enable(...).then(...) now works as expected. Removed a Promise.resolve() because that is the default. MozReview-Commit-ID: 4Shxtn0rjYH
This commit is contained in:
@@ -461,7 +461,6 @@ extensions.registerSchemaAPI("browserAction", "addon_parent", context => {
|
||||
|
||||
let icon = IconDetails.normalize(details, extension, context);
|
||||
BrowserAction.for(extension).setProperty(tab, "icon", icon);
|
||||
return Promise.resolve();
|
||||
},
|
||||
|
||||
setBadgeText: function(details) {
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
"name": "setTitle",
|
||||
"type": "function",
|
||||
"description": "Sets the title of the browser action. This shows up in the tooltip.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
@@ -83,6 +84,12 @@
|
||||
"description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -166,6 +173,7 @@
|
||||
"name": "setPopup",
|
||||
"type": "function",
|
||||
"description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
@@ -182,6 +190,12 @@
|
||||
"description": "The html file to show in a popup. If set to the empty string (''), no popup is shown."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -218,6 +232,7 @@
|
||||
"name": "setBadgeText",
|
||||
"type": "function",
|
||||
"description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
@@ -233,6 +248,12 @@
|
||||
"description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -269,6 +290,7 @@
|
||||
"name": "setBadgeBackgroundColor",
|
||||
"type": "function",
|
||||
"description": "Sets the background color for the badge.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
@@ -287,6 +309,12 @@
|
||||
"description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -323,6 +351,7 @@
|
||||
"name": "enable",
|
||||
"type": "function",
|
||||
"description": "Enables the browser action for a tab. By default, browser actions are enabled.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
@@ -330,6 +359,12 @@
|
||||
"name": "tabId",
|
||||
"minimum": 0,
|
||||
"description": "The id of the tab for which you want to modify the browser action."
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -337,6 +372,7 @@
|
||||
"name": "disable",
|
||||
"type": "function",
|
||||
"description": "Disables the browser action for a tab.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
@@ -344,6 +380,12 @@
|
||||
"name": "tabId",
|
||||
"minimum": 0,
|
||||
"description": "The id of the tab for which you want to modify the browser action."
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user