Preventing “SCRIPT5: Access is denied” error in IE

后端 未结 3 1918
梦毁少年i
梦毁少年i 2020-12-03 09:27

Scenario: Page A on A.com that has an IFrame containing Page B on B.com. Page B uses jQuery 1.10.1 and does not need to communicate with Page A.

Regardless

3条回答
  •  广开言路
    2020-12-03 10:31

    I found a workaround. This appears to be a bug ("feature"?) in jQuery 1.10.1. Using jQuery 1.10.0, the error no longer occurs:

    http://jsfiddle.net/86q5k/5/

    
    

    Strange. Very strange. If anyone knows the reason why this is happening in 1.10.1, and how to fix it, I (and jQuery minions around the globe) would certainly be very interested to know! :)


    UPDATE: Looks like this is a legit jQuery 1.10.1 bug: http://bugs.jquery.com/ticket/13980


    UPDATE: According to @emanuele-greco, this is fixed in 1.10.2 and up. So, upgrading your version of jQuery will likely fix the problem.

提交回复
热议问题