Firefox 3中的getImageData导致NS_ERROR_DOM_SECURITY_ERR [英] getImageData in Firefox 3 causing NS_ERROR_DOM_SECURITY_ERR

查看:206
本文介绍了Firefox 3中的getImageData导致NS_ERROR_DOM_SECURITY_ERR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图开发一个应用程序,它将在Firefox 3中使用getImageData,但getImageData调用中出现 NS_ERROR_DOM_SECURITY_ERR 。 JavaScript和图像都是由硬盘驱动器,这显然是一个安全违规?当这是活的时候,他们都将从同一个领域服务,所以这不会是一个问题,但是我怎么能在此期间发展呢? 解决方案

您可以尝试安装本地网络服务器,如Apache(在Unix上)或IIS(在Windows上)。这将最终为您提供与网络相关的最佳本地测试平台,因为您已经发现浏览器对待文件系统中的文件与网络服务器上的内容完全不同。


I'm trying to develop an application that will use getImageData in javascript in Firefox 3, but I am getting a "NS_ERROR_DOM_SECURITY_ERR" on the getImageData call. The javascript and the image are both currently being served from by hard drive, which is apparently a security violation? When this is live they will both be served from the same domain, so it won't be a problem, but how can I develop in the meantime?

解决方案

You could try installing a local webserver such as Apache (on unix) or IIS (on Windows). That will ultimately give you the best local test bench for web-related stuff, because as you have found out browsers treat files from the filesystem quite differently than content served from a webserver.

这篇关于Firefox 3中的getImageData导致NS_ERROR_DOM_SECURITY_ERR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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