【发布时间】:2014-03-22 18:24:11
【问题描述】:
根据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.
谢谢!
【问题讨论】:
标签: javascript firefox firefox-addon xul firefox-addon-sdk