Bug 1936525 - Remove inline event handler from PageStyleMenu. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D231791
This commit is contained in:
@@ -61,9 +61,8 @@ var gPageStyleMenu = {
|
|||||||
"checked",
|
"checked",
|
||||||
!currentStyleSheet.disabled && !styleDisabled
|
!currentStyleSheet.disabled && !styleDisabled
|
||||||
);
|
);
|
||||||
menuItem.setAttribute(
|
menuItem.addEventListener("command", event =>
|
||||||
"oncommand",
|
this.switchStyleSheet(event.currentTarget.getAttribute("data"))
|
||||||
"gPageStyleMenu.switchStyleSheet(this.getAttribute('data'));"
|
|
||||||
);
|
);
|
||||||
menuPopup.appendChild(menuItem);
|
menuPopup.appendChild(menuItem);
|
||||||
currentStyleSheets[currentStyleSheet.title] = menuItem;
|
currentStyleSheets[currentStyleSheet.title] = menuItem;
|
||||||
|
|||||||
Reference in New Issue
Block a user