- From: <bugzilla@jessica.w3.org>
- Date: Wed, 27 Apr 2011 18:10:23 +0000
- To: public-script-coord@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=12295 Mark S. Miller <erights@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |erights@gmail.com --- Comment #2 from Mark S. Miller <erights@gmail.com> 2011-04-27 18:10:22 UTC --- (In reply to comment #1) > It would be nice if this actually evaluated to true, from an author > perspective, because otherwise "foo instanceof Node" and so on are quite > confusing in the edge case where you've got an iframe or something. But I > guess it's easier to make it false from an interop perspective . . . In judging the author perspective, you need to consider consistency with the rest of JavaScript. While it might be nice if '{ } instanceof otherWindow.Object' or '[] instanceof otherWindow.Array' were true, that's not the way JavaScript works. Further, some of us seek to eventually make the Dom emulatable by Proxies. While a strawman Proxy extension http://wiki.ecmascript.org/doku.php?id=strawman:proxy_instanceof could emulate the behavior you have in mind, the currently accepted proxy proposal http://wiki.ecmascript.org/doku.php?id=harmony:proxies cannot. Nor can proxies as currently implemented in FF4 through 6.0a1. (Even if the strawman above does get approved, consistency still makes me favor that all these cross-frame instanceof cases be specified to return false.) -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
Received on Wednesday, 27 April 2011 18:10:25 UTC