How to get menuID on Android in javascript
Firefox on Android exposes a useful API to add/remove menu items in the main menu using javascript. This is usually done in addons.
From all sorts of examples like https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/NativeWindow/menu I learned how to add a menu item, get its menuID and using the menuID remove it later if needed.
What I was not able to find is a way to obtain the menuID of an already existing menu item, things which are in the menu by default.
The problem is that when a menu item is added the menu.add method returns the menuID which can be used later, but if the menu item is already there I don't know of a way of getting its menuID. I also don't know how to get a list of all already added menuIDs, this would be helpful too.
All Replies (1)
This is a user support forum. Posting to https://mail.mozilla.org/listinfo/mobile-firefox-dev or https://lists.mozilla.org/listinfo/dev-extensions