With the advent of multiprocessor Firefox, I decided to overwrite my addon using Addon-SDK.
My addon is basically a toolbar with a wide range of menus.
addonsdk provides no way to create a menu. So, I found this method with which I can add them to an existing toolbar. However, I cannot find a way to create such menus and add them to the Addon-SDK toolbar. So I thought I was just creating a toolbar the same way I was creating a menu.
So, I'm basically trying to create an XUL toolbar through javascript (I think):
var MyDelegate = {
onTrack: function(window){
if(window.location != "chrome://browser/content/browser.xul") {
return;
}
var document = window.document;
var MyBar = window.document.createElement('toolbar');
MyBar.setAttribute('id', 'MyToolbarID');
MyBar.setAttribute('toolbarname', 'MyTitle');
MyBar.setAttribute('class', 'chromeclass-toolbar');
MyBar.setAttribute('mode', 'full');
MyBar.setAttribute('hidden', 'false');
MyBar.setAttribute('insertafter', 'PersonalToolbar');
}
}
let utils = require('sdk/deprecated/window-utils');
utils.WindowTracker(spatDelegate);
What do I need to do to make this toolbar really create and display in the browser?
[update]
, SDK, , async , html id. html- , .