RESOLVED WONTFIX 27611
document.__proto__ Behavior
https://bugs.webkit.org/show_bug.cgi?id=27611
Summary document.__proto__ Behavior
Joseph Pecoraro
Reported 2009-07-23 11:49:02 PDT
Please read the comments on this bug report: https://bugs.webkit.org/show_bug.cgi?id=27169 Note that I'm only concerned with the instanceof. The typeof doesn't seem to be a major issue. Which behavior of instanceof do you think is correct? Summary: WebKit and Chrome: > document.__proto__ instanceof window.Node true > document.__proto__.__proto__.__proto__ === Node.prototype true >typeof document.__proto__ "object" Firefox: > document.__proto__ instanceof window.Node false > document.__proto__.__proto__.__proto__ === Node.prototype true >typeof document.__proto__ "object" Opera: > document.__proto__ instanceof window.Node false > document.__proto__.__proto__.__proto__ === Node.prototype ERROR > typeof document.__proto__ "undefined"
Attachments
Keishi Hattori
Comment 1 2009-07-23 11:51:01 PDT
Opera doesn7t support __proto__
Eric Seidel (no email)
Comment 2 2009-07-23 11:51:46 PDT
Adding two ECMA experts who would know this off the top of their heads.
Erik Arvidsson
Comment 3 2009-07-23 12:17:06 PDT
This is once again underspecified behavior. > document.__proto__ instanceof window.Node true This is correct because the [[Prototype]] of document should be a Node > document.__proto__.__proto__.__proto__ === Node.prototype true This is less clear. DOM defines everything in interfaces. But given that we treat an interface as a prototype in other places it seems as correct as we can get it document instanceof HTMLDocument document.__proto__instanceof Document document.__proto__.__proto__ instanceof Node I think this is (or should be) covered by WebIDL. To me it seems WebKit is doing as good as it can.
Eric Seidel (no email)
Comment 4 2009-10-24 10:29:40 PDT
Any comments as to why the resolution?
Note You need to log in before you can comment on or make changes to this bug.