使用Addon-SDK在新标签页/窗口中打开XUL [英] Open XUL in a new tab/window using Addon-SDK

查看:130
本文介绍了使用Addon-SDK在新标签页/窗口中打开XUL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 https://developer.mozilla .org / en-US / Add-ons / SDK / Guides / XUL_Migration_Guide

 您可以注册一个chrome :URI,带有皮肤和语言环境,这意味着您可以在基于SDK的插件中包含XUL窗口。 

我按照指示添加了一个chrome.manifest:

 内容my_addon内容/ 

xul文件在chrome / content下:

  myxul.xul 

 选项卡。开放( 铬://my_addon/content/myxul.xul); 

在新标签打开时,它返回找不到文件:

  Firefox在chrome://my_addon/content/myxul.xul找不到文件。 

谢谢!

解决方案

更改chrome.manifest的行为

 内容my_addon chrome / content / 


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!

解决方案

Change the line of the chrome.manifest to

content my_addon chrome/content/

这篇关于使用Addon-SDK在新标签页/窗口中打开XUL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆