On 4/9/07, Varun <[EMAIL PROTECTED]> wrote:
> 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.

Are you doing this in response to a preference change? You might want
to register a pref listener (via nsIPrefBranch2 interface) in each
window, each of those listeners removing/adding the context menu in
its own window. I.e.

var menuItem = document.getElementById("your-id");
menuItem.parentNode.removeChild(menuItem);

Any particular problem you had with the code you posted?

Nickolay
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners

Reply via email to