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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15259</bug_id>
          
          <creation_ts>2011-12-18 04:25:08 +0000</creation_ts>
          <short_desc>CustomEvent initCustomEvent</short_desc>
          <delta_ts>2012-11-28 14:31:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>DOM</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Brandon Slade">brandonyoyoslade</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>dominicc</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>61756</commentid>
    <comment_count>0</comment_count>
    <who name="Brandon Slade">brandonyoyoslade</who>
    <bug_when>2011-12-18 04:25:08 +0000</bug_when>
    <thetext>In the DOM4 specification, the interface of CustomEvent (found at http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#customevent) contains only one member: &quot;readonly attribute any detail;&quot; The DOM3EVENTS specification declares one more method overload, &quot;initCustomEvent(DOMString type, bool bubbles, bool cancelable, any detail);&quot;. (This can be found at http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-CustomEvent)

I know that the initEvent method is made obsolete due to the fact that in DOM3 you are introducing Event constructors, but as long as they&apos;re not actually depreciated, shouldn&apos;t you keep them simply for backwards-compatibility? At the very least, shouldn&apos;t you keep initCustomEvent for the same reason that you are keeping initEvent, or if you need to get rid of one, then unify the change and get rid of both?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61759</commentid>
    <comment_count>1</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2011-12-18 09:13:50 +0000</bug_when>
    <thetext>The reason that we&apos;re keeping initEvent is compatibility with deployed content (prototype.js, for example: &lt;https://github.com/sstephenson/prototype/blob/master/src/prototype/dom/event.js#L956&gt;); I rather doubt that reason applies as much to initCustomEvent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62026</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2011-12-26 05:56:32 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; The reason that we&apos;re keeping initEvent is compatibility with deployed content
&gt; …
&gt; I rather doubt that reason applies as much to initCustomEvent.

A couple of smaller frameworks use initCustomEvent:

&lt;http://codesearch.google.com/#search/&amp;q=initCustomEvent%5B%5Es%5D%20lang:js&amp;type=cs&gt;

eg &quot;JSDOM&quot;, &quot;Ample&quot; and &quot;XBL&quot; (an XBL2-in-JavaScript implementation.)

I’m not sure if these are sufficient justification for keeping initCustomEvent around or not. However it is more use than other init*Event (eg initProgressEvent) methods get (at least in the indexable, open source space.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62128</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-12-29 13:49:17 +0000</bug_when>
    <thetext>Lets keep this open until we know it has been removed from some implementations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78992</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-11-28 14:31:56 +0000</bug_when>
    <thetext>Okay, it&apos;s back in:

http://dom.spec.whatwg.org/
https://github.com/whatwg/dom/commit/5b575eec760d842d3d9dfe23650eb486854c6c39

Dominic, your name will be added to the acknowledgments next checkin as I forgot it this time.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>