似乎可以根据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.
我按照内容指示添加了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.
谢谢!
答案 0 :(得分:2)
将chrome.manifest的行更改为
content my_addon chrome/content/