Bug 1797838 - Add a webExtension property to CustomizableUI widgets for browserAction buttons. r=dao,willdurand
This property, along with the CustomizableUI.isWebExtensionWidget, will make it possible to distinguish WebExtension-provided widgets without sniffing CSS classes, which is what we currently do. In the event that the widget has been destroyed or hasn't yet been created, this will fallback to looking for the `-browser-action` suffix on the ID. This is mainly for use during migrations which happen early during CustomizableUI startup, when it's unlikely that the extensions have finished initializing themselves and creating their widgets yet. Differential Revision: https://phabricator.services.mozilla.com/D160802
This commit is contained in:
@@ -196,6 +196,7 @@ this.browserAction = class extends ExtensionAPIPersistent {
|
||||
id: this.id,
|
||||
viewId: this.viewId,
|
||||
type: "view",
|
||||
webExtension: true,
|
||||
removable: true,
|
||||
label: this.action.getProperty(null, "title"),
|
||||
tooltiptext: this.action.getProperty(null, "title"),
|
||||
|
||||
Reference in New Issue
Block a user