I have try to search here also googling. But it seem I have no luck.
I'm creating a small firefox addon, using Addon-SDK. Everything seem cool but the UI elements. It is really hard to implement.
I have read about the toolbarbutton which found here https://github.com/mozilla/addon-sdk/wiki/Community-developed-modules and the Mozilla XUL and decide to create my own toolbar button by tracking browser window, use WindowUtils.onTrack() and manipulating the Browser XUL DOM;
It's almost been done but when I try to disable and re-enable my add-on. The button didn't disappear and there were 2 button there.
This is so bad, can you show me how to destroy or remove that button also the other XUL elements when the addon was disabled or removed. We are using addon-SDK it was restart-less extension.
And my other question is what should we use when manipulate the BrowserXULDom WindowUtils or WindowMediator ? or the other, which is faster and more convenient ?