1

我有一个使用 WPML 插件的多语言 WordPress 站点,它允许拥有指向相同 WordPress 安装的单独域。(EN) erikbijma.com (荷兰) erikbijma.nl

我正在实现这个脚本来动态制作灰度图像 http://webdesignerwall.com/tutorials/html5-grayscale-image-hover

我以前尝试过使用 filter 属性的纯 CSS 方法,但它会减慢网站速度,而且它在 IE10 中不起作用 http://demosthenes.info/blog/540/Animating-CSS3-Image-Filters

在每种情况下(.nl 和 .com),我都从各自的域(.nl 和 .com)提供图像和脚本,所以我不明白为什么会出现安全错误。

IE10 中的错误消息

错误似乎发生在这里:

SCRIPT5022: SecurityError 
homepage.js, line 37 character 2

var imgPixels = ctx.getImageData(0, 0, canvas.width, canvas.height);

在火狐中

SecurityError: The operation is insecure.
[Break On This Error]   

var imgPixels = ctx.getImageData(0, 0, canvas.width, canvas.height);

任何帮助表示赞赏

谢谢

如果你想赚 30 美元,我在这里发布了问题 http://www.wpquestions.com/question/showChronoLoggedIn/id/7830

4

1 回答 1

2

我最终决定选择使用 GD 图像库的服务器端解决方案,但原始问题中提到的错误在这里解决了 http://wpquestions.com/question/showChronoLoggedIn/id/7830

这是由于一些使用 www 的 URL 和一些使用非 www 的 URL,以及 javascript 中的错误

于 2013-01-09T21:55:22.330 回答