RESOLVED DUPLICATE of bug 4833771113
[V8] Event.type incorrectly reports that it is writable
https://bugs.webkit.org/show_bug.cgi?id=71113
Summary [V8] Event.type incorrectly reports that it is writable
Jake Verbaten
Reported 2011-10-28 05:50:45 PDT
var e = document.createEvent("UIEvent"); var pd = Object.getOwnPropertyDescriptor(e, "type"); console.log(pd.writable); // type is writable e.type = "foobar"; console.log(e.type === ""); // Webkit Y U DO THIS. test : http://jsfiddle.net/WxA3a/1/ in chrome 14. I presume this is an issue with `e.type` living in C++ land and `e.type = "foobar"` living in ES land. As a sidenote delete e.type; e.type = "click"; breaks e.initEvent()
Attachments
Alexey Proskuryakov
Comment 1 2011-10-28 12:19:36 PDT
I cannot reproduce this with Safari 5.1 or with a current local build. The value of pd.writable is false, like it should be per <http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-Event>: readonly attribute DOMString type;
Erik Arvidsson
Comment 2 2011-10-28 12:30:24 PDT
Yeah, this is wrong in Chromium/V8. But, type is specced as a getter on Event.prototype
Jake Verbaten
Comment 3 2011-10-28 12:34:26 PDT
Given that the value is different in Safari 5.1 and Chrome (14/15). Is this still an issue with Webkit or an issue with v8/chromium? Should I go complain to v8 or chromium instead?
Dominic Cooney
Comment 4 2011-11-01 16:08:13 PDT
*** This bug has been marked as a duplicate of bug 48337 ***
Note You need to log in before you can comment on or make changes to this bug.