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", "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;