Open XUL in a new tab/window using Addon-SDK

纵饮孤独 提交于 2020-01-02 07:14:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!