Hi,

does anybody know how to create and dispatch an own command event?

I tried doing it like this, but the listeners are never called though 
there are no error messages in the javascript console...

// event is a command event fired by clicking a menuitem
// independentNode is a node having nothing to do with that menuitem
// and being at a completely different position in the DOM.
var evt = document.createEvent("XULCommandEvent");
evt.initCommandEvent("command", true, true, window, 1, false, false,
                      false, false, event);
independentNode.dispatchEvent(evt);

Anybody knows how to change this code so it actually works?

Malte
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to