Unsafe JavaScript attempt to access frame warning in Safari

前端 未结 3 913
清歌不尽
清歌不尽 2020-12-28 13:45

I\'m using Facebook Connect in my app. I have it working pretty well, but in the Safari Error console, I\'m seeing errors like this:

Unsafe JavaScript attemp         


        
相关标签:
3条回答
  • 2020-12-28 14:23

    This is a red herring. The request still goes through and everything is working properly but WebKit still logs an exception.

    0 讨论(0)
  • 2020-12-28 14:38

    It means you're attempting some form of cross origin access, which is unsafe -- while it may seem benign it's probably worth trying to find out why you're hitting it, if you use the nightlies or the Safari4 beta you can use the debugger in the web inspector, and make it break on all exceptions, which will let you see when it's actually attempting the cross-origin access.

    As for the hangs, if you can find some kind of reduced testcase it would be great if you could file them at http://bugs.webkit.org

    0 讨论(0)
  • 2020-12-28 14:40

    Safari's cross frame security is tighter than other browsers, I have done specific try/catch wrappers to handle these cases, if it otherwise works, great.

    Either way, would post the bug upstream as olliej suggests.

    0 讨论(0)
提交回复
热议问题