It seems that the XUL command and click events are somewhat different.
Although my function does get called when using the command event, the event object does not contain the button property.
My question is: how do I detect what mouse button that was pressed without using the click event?
The simplest code that can demonstrate my problem:
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script language="JavaScript">
var showMeTheButton=function(e)
{
alert(e.button);
}
</script>
<button onclick="showMeTheButton(event)" label="Click me with onclick"></button>
<button oncommand="showMeTheButton(event)" label="Click me with oncommand"></button>
</window>