【发布时间】:2014-03-13 10:41:14
【问题描述】:
我目前正在为 Firefox OS 开发我的第一个应用程序,并且我正在使用模拟器进行开发,因为我没有真正的硬件。
对于我的应用,我需要 redirects 权限(用于使用 OAuth),因此它需要获得特权。
只要我不将"type": "privileged" 添加到应用程序的清单中,我的应用程序(或实际完成的部分)就可以正常工作。如果我这样做,我的整个 JS 代码将不再运行(包括简单的事件监听器)。我已经在 Aurora 的 App-Manager 中使用 FFOS 1.2 和 1.3 模拟器测试了该行为,并且开发工具上没有输出。
你能帮帮我吗?
这是清单:
{
"default_locale": "en",
"description": "Feed the Reader is a free and open-source RSS-Reader. It works as a standalone app and with Feedly, The Old Reader and Tiny Tiny RSS as well.",
"developer": {
"name": "Philipp Trommler",
"url": ""
},
"icons": {
"16": "/icons/ftr_16.png",
"32": "/icons/ftr_32.png",
"48": "/icons/ftr_48.png",
"60": "/icons/ftr_60.png",
"64": "/icons/ftr_64.png",
"128": "/icons/ftr_128.png"
},
"launch_path": "/app.html",
"name": "Feed the Reader",
"permissions": {
"browser": {
"description": "Used for OAuth authentication."
},
"systemXHR": {
"description": "Used for asynchronous loading."
}
},
"redirects": [
{"from": "http://localhost",
"to": "/redirects.html"}
],
"type": "privileged",
"version": "1.0"
}
【问题讨论】:
标签: javascript html web-applications firefox-os