In any nested iframe, window.parent always points to *top* iframe's parent
Reported by gleneivey | May 5th, 2010 @ 12:27 PM
In the structure "page contains iframe contains iframe....", in the second iframe (or any iframe at a lower nesting level within the range I've tested) window.document seems to have the correct content, but window.parent always points to "page" rather than pointing to the nested iframe's actual parent (the iframe immediately above it).
This can be seen in the "Iframe nesting" test within specs/scope/spec.js if you modify the path to "iframe2.html" contained in specs/fixtures/scope/iframe1.html and the loop-generated path to the iframe#.html links contained in specs/scope/spec.js so that they are absolute file system paths appropriate for your system (to allow the test to progress past the failure due to http://envjs.lighthouseapp.com/projects/21590/tickets/168).
The test errors due to this bug appear like:
[java] error loading html element [object HTMLScriptElement] TypeError: Cannot read property "innerHTML" from null
As the result of the "innerHTML" reference that occurs in specs/fixtures/scope/iframeN.html.
No comments found
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
a javascript browser environment