为了简单起见,我想修改现有的插件。我有这段代码:
<popup id="contentAreaContextMenu">
<menu id="llOpenLocalLink" label="&llOpenLocalLink.label;" insertbefore="context-sep-open" >
<menupopup>
<menuitem id="llOpenInThisTab" label="&llOpenInThisTab.label;" oncommand="LocalLink.openLinkInThisTab(event)"/>
<menuitem id="llOpenInNewTab" label="&llOpenInNewTab.label;" oncommand="LocalLink.openLinkInNewTab(event)"/>
<menuitem id="llOpenInNewWindow" label="&llOpenInNewWindow.label;" oncommand="LocalLink.openLinkInNewWindow(event)"/>
</menupopup>
</menu>
</popup>
我只想要一个单击的菜单条目。我试过这个但是没有执行:
<popup id="contentAreaContextMenu">
<menu id="llOpenLocalLink" label="&llOpenLocalLink.label;" insertbefore="context- sep-open" oncommand="LocalLink.openLinkInNewTab(event)">
</menu>
</popup>
确定。我找到了答案:
<popup id="contentAreaContextMenu">
<menuitem id="llOpenLocalLink" label="&llOpenLocalLink.label;" insertbefore="context-sep-open" oncommand="LocalLink.openLinkInNewTab(event)"/>
</popup>