Search code examples
firefoxfirefox-addonfirefox-addon-sdk

How to show a menu after clicking on the widget icon?


I am using firefox addon builder (Addon kit 1.7) and I wonder to know if it's possible to show a simple menu like the context menu of firefox just after clicking on the widget icon. I need few hints. Thanks in advance.


Solution

  • I managed to make it work using the MenuPopup package by Yaelle Borghini and uploaded a simple example on the Addon Builder site.

    You will have to expand on Yaelle's code to support dynamic modifications of the menu items because it's not fully built in at the moment (though it shouldn't be too hard to add it).

    Here's the discussion on the Mozilla forums about how to show menus with the Addon SDK that got me started.