据https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/XUL_Migration_Guide所述,这似乎是可能的:
我按照指示添加了一个chrome.manifest文件,其中包含以下内容:
打开新标签页时返回“文件未找到”:
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.
我按照指示添加了一个chrome.manifest文件,其中包含以下内容:
content my_addon content/
将.xul文件放在chrome/content目录下:
myxul.xul
然后我在main.js中使用tabs.open:
tabs.open("chrome://my_addon/content/myxul.xul");
打开新标签页时返回“文件未找到”:
Firefox can't find the file at chrome://my_addon/content/myxul.xul.
谢谢!