根据https://developer.mozilla.org/zh-CN/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.
谢谢!
将chrome.manifest的行更改为
content my_addon chrome/content/
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句