Comment #3 on issue 5690 by ilkkah: Cannot access iframe through the DOM
http://code.google.com/p/chromium/issues/detail?id=5690
Well this is strange. Now I seem to be getting only 3 too.
Well, actually not quite. I changed the testcase a bit and now I'm getting
different
results in Opera (9.60) and Safari for Win (3.0.3).
Although to me this isn't as alarming as I was thinking originally (I
thought, for some
reason, that Firefox was working differently). You can decide if it's
important of
course.
The testcase that has a different behavior in Opera/Safari vs.
Chrome/Firefox/IE is this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
</HEAD>
<BODY>
<iframe id="a_variable" src="/index.html" name="a_variable"></iframe>
<script type="text/javascript">
var a_variable = 3;
addEvent = function(obj, name, handler) {
if (obj.attachEvent)
obj.attachEvent("on" + name, handler);
else
obj.addEventListener(name, handler, false);
};
function afunc()
{
alert(frames['a_variable']+" .. "+top.a_variable);
}
addEvent(window, "load", afunc);
</script>
</BODY>
</HTML>
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---