Dispatch CustomEvent() to prefwindow - Firefox addon
问题 Working with a Firefox addon, I wish to send a CustomEvent() to a preference window. I open the preference window using an openDialog(), and keep a reference to the opened window. After that, I try to dispatch the event, but the event is never received. var pWin = window.openDialg("chrome://myextension/path/options.xul", "name", features); var event = new pWin.CustomEvent("prefwindow-event"); pWin.dispatchEvent(event); In the prefwindow scope, I have this code in the XUL attached script :