<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>71113</bug_id>
          
          <creation_ts>2011-10-28 05:50:45 -0700</creation_ts>
          <short_desc>[V8] Event.type incorrectly reports that it is writable</short_desc>
          <delta_ts>2011-11-01 16:08:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>48337</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jake Verbaten">raynos2</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>arv</cc>
    
    <cc>dominicc</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>492402</commentid>
    <comment_count>0</comment_count>
    <who name="Jake Verbaten">raynos2</who>
    <bug_when>2011-10-28 05:50:45 -0700</bug_when>
    <thetext>var e = document.createEvent(&quot;UIEvent&quot;);
var pd = Object.getOwnPropertyDescriptor(e, &quot;type&quot;);
console.log(pd.writable); // type is writable
e.type = &quot;foobar&quot;;
console.log(e.type === &quot;&quot;); // 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 = &quot;foobar&quot;` living in ES land.

As a sidenote

delete e.type; 
e.type = &quot;click&quot;;

breaks e.initEvent()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>492590</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-10-28 12:19:36 -0700</bug_when>
    <thetext>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 &lt;http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-Event&gt;:

        readonly attribute DOMString        type;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>492603</commentid>
    <comment_count>2</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2011-10-28 12:30:24 -0700</bug_when>
    <thetext>Yeah, this is wrong in Chromium/V8.

But, type is specced as a getter on Event.prototype</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>492607</commentid>
    <comment_count>3</comment_count>
    <who name="Jake Verbaten">raynos2</who>
    <bug_when>2011-10-28 12:34:26 -0700</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494259</commentid>
    <comment_count>4</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2011-11-01 16:08:13 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 48337 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>