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",
|
||||
!currentStyleSheet.disabled && !styleDisabled
|
||||
);
|
||||
menuItem.setAttribute(
|
||||
"oncommand",
|
||||
"gPageStyleMenu.switchStyleSheet(this.getAttribute('data'));"
|
||||
menuItem.addEventListener("command", event =>
|
||||
this.switchStyleSheet(event.currentTarget.getAttribute("data"))
|
||||
);
|
||||
menuPopup.appendChild(menuItem);
|
||||
currentStyleSheets[currentStyleSheet.title] = menuItem;
|
||||
|
||||
Reference in New Issue
Block a user