问题
It seems possible according to https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/XUL_Migration_Guide:
you can register a chrome: URI, with a skin and locale, and this means you can include XUL windows in an SDK-based add-on.
I added a chrome.manifest as instructed with content:
content my_addon content/
and put .xul file under chrome/content:
myxul.xul
then I use tabs.open in main.js:
tabs.open("chrome://my_addon/content/myxul.xul");
It returns "File not found" as the new tab is opened:
Firefox can't find the file at chrome://my_addon/content/myxul.xul.
Thanks!
回答1:
Change the line of the chrome.manifest to
content my_addon chrome/content/
来源:https://stackoverflow.com/questions/22581699/open-xul-in-a-new-tab-window-using-addon-sdk