My goal is to override the reference to the topmost window for all scripts that are executed in an iframe. I have the following code which was tested to work in IE 8+ and FireFox 3,6+ but does not work in Chrome 19.
var top = "test";
console.debug(top);
This outputs: “test” in IE and FireFox, but shows a reference to the top window in chrome. Is it possible that Chrome uses a mechanism to avoid the reference from being overriden?
Issue 10279: window.top shadowing differs between JSC and V8
Issue 26220: window.top can’t be hidden with var (unlike other browsers)