<?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>6598</bug_id>
          
          <creation_ts>2006-01-16 15:24:58 -0800</creation_ts>
          <short_desc>Should support IE Node methods attachEvent and detachEvents</short_desc>
          <delta_ts>2022-06-14 16:41:00 -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>DOM</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anders Carlsson">andersca</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aestes</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>bdakin</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>ian</cc>
    
    <cc>rjiang</cc>
    
    <cc>rniwa</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28624</commentid>
    <comment_count>0</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2006-01-16 15:24:58 -0800</bug_when>
    <thetext>Documentation at 

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/attachevent.asp

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/detachevent.asp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28975</commentid>
    <comment_count>1</comment_count>
    <who name="Justin Haygood">jhaygood</who>
    <bug_when>2006-01-20 05:45:07 -0800</bug_when>
    <thetext>A shared implementation with the W3C methods is possible.

attatchEvent(&quot;onload&quot;,functionRef) is 100% equivalent to addEventListener
(&quot;load&quot;,functionRef,false) for instance</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40160</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-04-22 09:16:24 -0700</bug_when>
    <thetext>Fixing this would fix bug 8534.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41901</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-05-10 13:40:34 -0700</bug_when>
    <thetext>&lt;http://www.quirksmode.org/blog/archives/2005/08/addevent_consid.html&gt;: &quot;addEventListener and attachEvent should not be considered equal&quot;.

This talks about the meaning of &quot;this&quot; keyword; looking at the documentation, the bubbling/canceling traits of similar IE and W3C events are also different.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44622</commentid>
    <comment_count>4</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2006-06-04 09:48:01 -0700</bug_when>
    <thetext>We don&apos;t need to implement attachEvent and detachEvent in order to support live.com or start.com since the Mozilla compat layer is used which provides implementations of those functions</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44648</commentid>
    <comment_count>5</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-06-04 11:33:44 -0700</bug_when>
    <thetext>This is one of those areas I&apos;m nervous about supporting.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44649</commentid>
    <comment_count>6</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-06-04 11:34:29 -0700</bug_when>
    <thetext>If we added support for this, there are sites that would take us down the IE event handling code path.  I&apos;d rather wait to see if this is a real-world problem before adding support for it.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22746</commentid>
    <comment_count>7</comment_count>
    <who name="Justin Haygood">jhaygood</who>
    <bug_when>2007-02-19 20:16:36 -0800</bug_when>
    <thetext>Couldn&apos;t this take the same approach as the hidden document.all support?

Support it if its used, but not if its tested for directly:

site does window.attachEvent(&quot;load&quot;,function); // Works

site does if( window.attachEvent ) window.attachEvent(&quot;load&quot;,function); // Doesn&apos;t, since window.attachEvent is &quot;hidden&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1838</commentid>
    <comment_count>8</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2007-08-20 19:47:48 -0700</bug_when>
    <thetext>here&apos;s a real website (popular in the alexa rankings) that depends on attachEvent:
http://house.vnet.cn

granted, it uses attachEvent to scroll some advertisements as you scroll the page!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1833</commentid>
    <comment_count>9</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-08-20 21:31:28 -0700</bug_when>
    <thetext>Well noted. Should we have a keyword to mark bugs that affect sites which are popular in the Alexa rankings?

Also, is there any way to quantify the risk of sites giving us the IE-compatibility event handling code path that Hyatt mentioned? I would hope most sites would use addEventListener in preference to attachEvent when both are available, but it&apos;s hard to be certain.

As a side note, I believe Opera supports the IE event handling methods.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57067</commentid>
    <comment_count>10</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-09-26 07:01:32 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; Also, is there any way to quantify the risk of sites giving us the
&gt; IE-compatibility event handling code path that Hyatt mentioned?

It seems that testing for attachEvent is a very common way to detect IE, so it clearly needs to be invisible if implemented. See, for example, &lt;http://dev.rubyonrails.org/ticket/6800&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62166</commentid>
    <comment_count>11</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-24 05:20:50 -0800</bug_when>
    <thetext>The left navigation panel of the MSDN site requires attachEvent/detachEvent:

http://msdn2.microsoft.com/en-us/library/ms536694.aspx

Because Firefox implements these DOM methods, the left nav panel works when this page is loaded on it.  See the JavaScript in this file as well:

http://msdn2.microsoft.com/App_scripts/ssmoz.js

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62387</commentid>
    <comment_count>12</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2007-11-26 13:05:29 -0800</bug_when>
    <thetext>I don&apos;t understand the last comment -- Firefox doesn&apos;t support attachEvent(), and both Safari and Firefox are given attachEvent proxies in the aforementioned compat layer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62389</commentid>
    <comment_count>13</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-26 13:09:33 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; I don&apos;t understand the last comment -- Firefox doesn&apos;t support attachEvent(),
&gt; and both Safari and Firefox are given attachEvent proxies in the aforementioned
&gt; compat layer.

Perhaps the compat layer is not being activated with Safari 3, then.  Sorry...didn&apos;t look very deeply into the JavaScript code.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62394</commentid>
    <comment_count>14</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-11-26 13:48:11 -0800</bug_when>
    <thetext>(In reply to comment #13)
&gt; (In reply to comment #12)
&gt; &gt; I don&apos;t understand the last comment -- Firefox doesn&apos;t support attachEvent(),
&gt; &gt; and both Safari and Firefox are given attachEvent proxies in the aforementioned
&gt; &gt; compat layer.
&gt; 
&gt; Perhaps the compat layer is not being activated with Safari 3, then. 
&gt; Sorry...didn&apos;t look very deeply into the JavaScript code.

And this would be Bug 13546!
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68241</commentid>
    <comment_count>15</comment_count>
    <who name="Rui Jiang">rjiang</who>
    <bug_when>2008-01-25 17:12:47 -0800</bug_when>
    <thetext>Another example of site using this:
https://personal.bank.ecitic.com:444/js/menu4.js

This is top 7th bank in China. Log in with IE from https://personal.bank.ecitic.com:444 (you need an account though)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286345</commentid>
    <comment_count>16</comment_count>
    <who name="Andy Estes">aestes</who>
    <bug_when>2010-09-28 10:27:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/7867748&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>286778</commentid>
    <comment_count>17</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2010-09-29 02:04:49 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; As a side note, I believe Opera supports the IE event handling methods.

We are in the process of removing support for these.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875895</commentid>
    <comment_count>18</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-06-14 15:29:16 -0700</bug_when>
    <thetext>Can this bug be closed since even IE11 dropped the support for &quot;attachEvent&quot; in 2013 (release date) and now IE11 is also getting marked as EOL / EOS tomorrow (based on my timezone).

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa703974(v=vs.85)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875908</commentid>
    <comment_count>19</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-06-14 16:41:00 -0700</bug_when>
    <thetext>Yeah, this is &quot;won&apos;t fix&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>