fx153: Don't assign oncommand attribute strings to .oncommand

Bug 1974578 added oncommand to GlobalEventHandlers for the Invoker
Commands API, so the assignment in _initImportedNodesPostInsert() -- an
inert expando write until now -- started setting the WebIDL event
handler, and [LegacyTreatNonObjectAsNull] turns a string into null. That
wiped the handlers compiled when the pane fragment was imported, leaving
every inline oncommand handler in the preferences panes dead.

importNode() compiles the attribute handlers itself, so the loop can
just be removed.
This commit is contained in:
Dan Stillman 2026-07-29 15:56:31 -04:00
parent 35a70117b0
commit b5ceb6fa65

View file

@ -608,12 +608,6 @@ ${str}
attributeFilter: ['preference']
});
// parseXULToFragment() doesn't convert oncommand attributes into actual
// listeners, so we'll do it here
for (let elem of container.querySelectorAll('[oncommand]')) {
elem.oncommand = elem.getAttribute('oncommand');
}
for (let child of container.children) {
let event = new Event('load');
event.waitUntil = (promise) => {