Permission denied to call method Location.toString

蹲街弑〆低调 提交于 2019-12-01 10:31:25

If you are dealing with any Flash through a cross-domain iframe, then it is quite possible that you are seeing a bug in Adobe's Flash Player that occurs with FF2 and FF3.

The bug is in Adobe's public JIRA here: http://bugs.adobe.com/jira/browse/FP-561

There seems to be no motivation to get it fixed, unfortunately.

If the script is executed from a different domain, or you are trying to access the contents of a frame/window/iframe of a different domain, you will see this error. Safari's behavior was a little different, at least in the v1-2 era (iirc), so you will probably want to test in that as well.

If you are including scripts via a different domain, you need to make sure your actual triggers/events are tied in and executed from inline scripts, or from a script file loaded from the same domain as your html for best results.

Doga

Hi I've answered a similar question

why/where the error “Permission denied for to call method Location.toString”.

This is caused by firebug showing errors from other windows in your console. In short, these errors will probably be nothing to do with your code at all.

If you want to test this theory, you can close all other windows in firebug, clear your console and test just your site.

Are you seeing this in Firebug, by any chance?

I'm getting the same thing in Firefox, off-and-on, after adding jQuery to my site. I'm calling the jQuery js from another site (different domain completely), which I figure isn't much different than calling it from Google's servers.

I have no code using jQuery at all as of the moment. And, while Firebug reports this as an error, it doesn't do so all the time. While I have it turned on, I'm seeing no errors in IE.

While there are different libraries involved, my guess is that Firebug is generating a false-positive.

Now if you're not using Firebug when you see this ... are you using YUI hosted on your own server? What browser are you using? Etcetera.

~James

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!