Hi,

My extension overlays browser.xul and has a tab contect menu item which is
added to the tab-context menu on window.load

is there a way that i can remove this menuitem dynamically, if i already
have multiple windows open? I'm currently trying
'ctsep' and 'ctTabCtx' are the id's of my seperator and menuitem.
=================================================
var ctwm = Components.classes["@mozilla.org/appshell/window-mediator;1
"].getService(Components.interfaces.nsIWindowMediator);
           var ctenumerator = ctwm.getEnumerator('navigator:browser');
           var ctwin;
while(ctenumerator.hasMoreElements())
                   {
                    ctwin = ctenumerator.getNext();

                   ctwin.getBrowser().mStrip.childNodes[1].removeChild(
ctwin.document.getElementById('ctsep'));
                    ctwin.getBrowser().mStrip.childNodes[1].removeChild(
ctwin.document.getElementById('ctTabCtx'));

                   }
               }, 0);
=================================================
Any sugestions will be appreciated.

Regards
Shivanand Sharma
http://varun21.googlepages.com/
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to