Bug 1936525 - Remove inline event handler from PageStyleMenu. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D231791
This commit is contained in:
Tom Schuster
2024-12-12 11:07:24 +00:00
parent 6ea22469e1
commit 4b3002acd1

View File

@@ -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;