Firefox Bootstrapped Addons では、コンテキスト メニュー項目を手動で挿入/削除、有効/無効、非表示/非表示にする必要があります。
それらを 1 つの要素 (その要素の子として) にグループ化して、グループを 1 つとして処理できるかどうか、つまり、親ノードを削除してすべての子を削除できるかどうか疑問に思っていました。
例えば:
<some parent element for grouping>
<menuseparator/>
<menuitem .... />
<menuitem .... />
<menuseparator/>
<menuitem .... />
<menuseparator/>
</some parent element for grouping>
中に入れてみまし<menu> ... </menu>
たが、へこんでしまいましたmenuitem
更新:
Flashgot オーバーレイには、混合されたグループ化があることに気付きましたmenuitem
。menupopup
<popup id="contentAreaContextMenu">
<menu id="flashgot-submenu" hidden="true" persist="hidden" label="FlashGot" class="menu-iconic flashgot-icon-lnk" accesskey="&flashgotLink.accesskey;" insertbefore="context-sep-selectall,context-sep-stop,context-sep-copylink" >
<menupopup>
<menuseparator id="flashgot-submenu-anchor" hidden="true" />
<menuitem id="flashgot-menuitem-it" label="&flashgotLink;" accesskey="&flashgotLink.accesskey;" oncommand="gFlashGot.downloadPopupLink()" key="flashgot-link-key" class="menuitem-iconic flashgot-icon-lnk" />
<menuitem id="flashgot-menuitem-sel" label="&flashgotSel;" accesskey="&flashgotSel.accesskey;" oncommand="gFlashGot.delayCmd('Sel')" key="flashgot-sel-key" class="menuitem-iconic flashgot-icon-sel" />
<menuitem id="flashgot-menuitem-all" label="&flashgotAll;" accesskey="&flashgotAll.accesskey;" oncommand="gFlashGot.delayCmd('All')" key="flashgot-all-key" class="menuitem-iconic flashgot-icon-all" />
<menuitem id="flashgot-menuitem-tabs" label="&flashgotTabs;" accesskey="&flashgotTabs.accesskey;" oncommand="gFlashGot.delayCmd('Tabs')" key="flashgot-tabs-key" class="menuitem-iconic flashgot-icon-tabs" />
<menuitem id="flashgot-menuitem-media" label="&flashgotMedia;" oncommand="gFlashGot.downloadMedia()" key="flashgot-media-key" class="menuitem-iconic flashgot-icon-media" />
<menuitem id="flashgot-menuitem-buildGallery" label="&flashgotBuildGallery;" class="menuitem-iconic flashgot-icon-buildGallery" oncommand="gFlashGot.buildGallery()" />
<menu id="flashgot-menu-options" class="menu-iconic flashgot-icon-opts" label="&flashgotOptions;" >
<menupopup id="flashgot-menupopup-options" onpopupshowing="gFlashGot.prepareOptsMenu(event.target)">
<menuitem id="flashgot-ctx-menuitem-nodms" hidden="true" label="&flashgotNoDMS;" oncommand="gFlashGotService.showDMSReference()" />
<menuseparator id="flashgot-ctx-sep-nodms" />
<menuitem id="flashgot-ctx-menuitem-opt-autoStart" label="&flashgotAutostart;" type="checkbox" oncommand="gFlashGot.switchOption('autoStart')" />
<menuitem id="flashgot-ctx-menuitem-opt-includeImages" label="&includeImages.label;" type="checkbox" oncommand="gFlashGot.switchOption('includeImages')" />
<menuitem id="flashgot-ctx-menuitem-opts" label="&flashgotMoreOpts;" oncommand="gFlashGot.openOptionsDialog()" />
<menuseparator id="flashgot-ctx-sep-about" />
<menuitem id="flashgot-ctx-menuitem-about" label="&flashgotAbout;" oncommand="gFlashGot.openAboutDialog()" />
<menuitem id="flashgot-ctx-homepage" label="&flashgotVisitHomepage;" oncommand="gFlashGot.browseHomePage()" />
</menupopup>
</menu>
</menupopup>
</menu>
<menuseparator id="flashgot-context-separator" hidden="true" insertbefore="context-sep-selectall,context-sep-stop,context-sep-copylink" />
<menuseparator id="flashgot-context-separator2" hidden="true" insertbefore="context-sep-selectall,context-sep-stop,context-sep-copylink" />
</popup>
一枚目は普通。2つ目は、を挿入した後menuitem
です<menu class="menu-iconic>