Version: (using KDE KDE 3.1) Installed from: RedHat RPMs OS: Linux Testcase is found on http://www.kakeboksen.org/javascript/tester/instanceof-number/frameset.html Konqueror fails on testcase #1 and #2 once the window reference points to any other window (child window, parent frameset, etc). The instanceof operator works correctly for variables in the same window (as testcase #3 shows), and I expected this behaviour to happen also when going between windows. I haven't dug really deeply into the ECMA-262 reference to know exactly how it's expected to behave, but from my understanding of the spec it should work in all cases (Mozilla 1.5 does it this way).
My guess (without even trying out anything): we have to share built-in types like Array between all interpreter instances. I even recall some changes to that part of the code in JavaScriptCore.
possibly related: #72812
*** Bug 72812 has been marked as a duplicate of this bug. ***
If you have a page (test.html) with a framed page in it (test2.html) the instanceof operator in the framed page no longer works. === test.html <html> <head> <script> window.onload = function() { window.frames.test2.testInstanceOf(); } </script> </head> <body> <iframe src="test2.html" name="test2"></iframe> </body> </html> === test2.html <html> <head> <script> function testInstanceOf() { alert(([] instanceof Array) + "\n" + (new Date() instanceof Date)); } if (window == top) testInstanceOf(); </script> </head> <body> test 2 </body> </html>
btw. that was using kde 3.5.7.
c#4 passes in 4.0.x. The testcase in #1 does what I expect it to do, and what IceWeasel does as well, but not what the testcase seems to be expecting...
Closing based on comment #6