зеркало из https://github.com/mozilla/gecko-dev.git
Bug 963779 - use handleEvent for Australis command handler, r=mconley
This commit is contained in:
Родитель
9e6244a84f
Коммит
1f78f080d8
|
@ -165,6 +165,9 @@ const PanelUI = {
|
|||
|
||||
handleEvent: function(aEvent) {
|
||||
switch (aEvent.type) {
|
||||
case "command":
|
||||
this.onCommandHandler(aEvent);
|
||||
break;
|
||||
case "popupshowing":
|
||||
// Fall through
|
||||
case "popupshown":
|
||||
|
@ -408,11 +411,11 @@ const PanelUI = {
|
|||
}
|
||||
items.appendChild(fragment);
|
||||
|
||||
this.addEventListener("command", PanelUI.onCommandHandler);
|
||||
this.addEventListener("command", PanelUI);
|
||||
},
|
||||
|
||||
_onHelpViewHide: function(aEvent) {
|
||||
this.removeEventListener("command", PanelUI.onCommandHandler);
|
||||
this.removeEventListener("command", PanelUI);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ const CustomizableWidgets = [{
|
|||
}
|
||||
items.appendChild(fragment);
|
||||
|
||||
aEvent.target.addEventListener("command", win.PanelUI.onCommandHandler);
|
||||
aEvent.target.addEventListener("command", win.PanelUI);
|
||||
},
|
||||
onViewHiding: function(aEvent) {
|
||||
let doc = aEvent.target.ownerDocument;
|
||||
|
@ -284,8 +284,7 @@ const CustomizableWidgets = [{
|
|||
}
|
||||
|
||||
parent.appendChild(items);
|
||||
aEvent.target.removeEventListener("command",
|
||||
win.PanelUI.onCommandHandler);
|
||||
aEvent.target.removeEventListener("command", win.PanelUI);
|
||||
}
|
||||
}, {
|
||||
id: "add-ons-button",
|
||||
|
|
Загрузка…
Ссылка в новой задаче