Ajax在Firefox插件 [英] Ajax In Firefox Plugin

查看:77
本文介绍了Ajax在Firefox插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法从Firefox插件发送Ajax请求到服务器?如果是的话如何?如果不是,我们如何在Firefox插件中进行客户端服务器通信?



我想从服务器获取一些json数据并根据客户端输入操作dom对象。



I我很喜欢插件编程初学者

问候,
Jishnu

解决方案

 权限从内容中您应该添加访问跨域内容的权限, :{
cross-domain-content:[http://example.org/,http://example.com/]
}

文档中的更多信息


Is there any way to send Ajax request to server from Firefox plugin? If yes how? If no, how do we have client server communication in Firefox plugin?

I want to get some json data from server and manipulate dom object according to the client input.

I am pretty beginner in plugin programming

Regards, Jishnu

解决方案

From a contentscript you should add the permissions to access cross-domain content, URLs you want to:

"permissions": {
    "cross-domain-content": ["http://example.org/", "http://example.com/"]
}

More info in the documentation.

这篇关于Ajax在Firefox插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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