使用Firefox的插件创建跨网域ajax请求 [英] Making crossdomain ajax requests with addons for Firefox

查看:138
本文介绍了使用Firefox的插件创建跨网域ajax请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点困惑,如何你可以或不能在Firefox的addons中做跨域的ajax请求。像LastPass和Xmarks这样的插件提示你可以这样做,但是当我尝试google时,大家似乎都说你不能,除非用户在Firefox的设置中设置了首选项。如果不能使用跨域,那么Xmarks,LastPass和其他插件如何处理与其各自服务器的通信?

I'm a bit confused about how you can or cannot make crossdomain ajax requests in addons for Firefox. Addons such as LastPass and Xmarks suggest you can do it, however when I try to google how you do it, everyone seem to say you cannot, unless the user has set a preference in the settings of Firefox. If crossdomain isn't possible, then how do Xmarks, LastPass and other addons handle the communication with theirs respective servers?

推荐答案

最肯定可以在Firefox附加组件中创建跨域 XMLHttpRequest

You most definitely can make cross-domain XMLHttpRequests in Firefox add-ons.

这里有一个引用: https://developer.mozilla.org/en/Extension_ Frequ_Asked_Questions#I_cannot_initiate_an_XMLHttpRequest_from_my_extension

这篇关于使用Firefox的插件创建跨网域ajax请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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