Firefox version : 4.0.1
I have a commandset which fires when something is selected.
The commandset is working fine. If I put a simple window.alert('test'); it does fire. However when I try to call another c开发者_JAVA百科ommand using goUpdateCommand, it does not call it.
The code in the browserOverlay.xul is as below :
<command id="cmd_testselect" oncommand="window.alert('command fired');"/>
<commandset commandupdater="true"
events="select"
oncommandupdate="goUpdateCommand('cmd_testselect');"/>
Note : I have added the globalOverlay.js as below :
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
Any ideas what I might be doing wrong ?
I think you actually meant to call goDoCommand()
and not goUpdateCommand()
.
精彩评论