The NativeWindow object is only available to privileged code running on Firefox for Android, and is intended for use by Firefox for Android add-ons.

Summary adds an item to the main menu in Firefox for Android, returning an ID for the item. To remove the item, use, passing in the item's ID.


The ID of the item to remove.


The following example adds a menu item with the label "Show Toast", which displays a toast notification when clicked:

function showToast(window) {"Showing you a toast", "short");  
var menuID;  
function addMenuItem(window) {  
  menuID ="Show Toast", null, function(){  
function removeMenuItem(window) {;  

See Also

Document Tags and Contributors

 Contributors to this page: wbamberg, justinpotts
 Last updated by: wbamberg,