likev / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

Using top.location.search - Permission denied in IE8 #321

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Include IE8.js to a page
2. Load page in an iframe rendered in another domain using Internet Explorer 
8's IE7 browser mode

(Could not find real 7 for testing right about now, but IE9.js 2.1beta4 
includes the same test and that's used with 8 anyway)

What is the expected output? What do you see instead?

Expected output would be no errors in Script console, but we get "Permission 
denied IE8.js, line 6 character 152"

What version of the product are you using? On what operating system?

IE: 8 (in IE7 browser mode)
IE8.js: 2.1(beta4)
Windows: XP

Please provide any additional information below.

IE8 script seems to check top.location.search for 'ie7_off' string using 
regexp. Shouldn't it use plain location.search / window.location.search instead 
since the page in question might be rendered in an iframe where the top url 
will be out of our control.

Original issue reported on code.google.com by ilja.eve...@liilak.com on 21 Apr 2011 at 12:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
the workaround is download the file on your server, and edit it as following:
<code>if(/ie7_off/.test(top.location.search)</code>
to 
<code>if(/ie7_off/.test(location.search)</code>

Original comment by Romesh.K...@gmail.com on 9 Sep 2012 at 12:55