I like to create a window by extending the basic Firefox window which is defined in chrome://browser/content/browser.xul as the top level element (is not overlay).
My question is about branching/forking from basic window definition before any modification applied to it by other extension and is not about how to apply overlay or modification to what user see as main FF window.
Do you have any idea how to do that?
Your question is still about overlays. Your overlay should go like this:This example will add a<commandset>element to the root of the browser window (which happens to be a<window>element with IDmain-window).Edit: It appears that the question wasn’t about adding elements on the top level but rather about making a fork of an existing XUL document. You can create an alias by adding an
overridedirective to your chrome.manifest:Now you can apply an overlay to the alias ony:
Overlays apply to URLs which makes this possible. Now you can open
chrome://myextension/content/browser.xulin a new window and it should be the browser window but with your overlay applied. Please note that this approach has limitations, e.g. extensions overlaying the browser window will have no effect on your window (their overlays only apply to the original browser window URL).