WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
6598
Should support IE Node methods attachEvent and detachEvents
https://bugs.webkit.org/show_bug.cgi?id=6598
Summary
Should support IE Node methods attachEvent and detachEvents
Anders Carlsson
Reported
2006-01-16 15:24:58 PST
Documentation at
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/attachevent.asp
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/detachevent.asp
Attachments
Add attachment
proposed patch, testcase, etc.
Justin Haygood
Comment 1
2006-01-20 05:45:07 PST
A shared implementation with the W3C methods is possible. attatchEvent("onload",functionRef) is 100% equivalent to addEventListener ("load",functionRef,false) for instance
Alexey Proskuryakov
Comment 2
2006-04-22 09:16:24 PDT
Fixing this would fix
bug 8534
.
Alexey Proskuryakov
Comment 3
2006-05-10 13:40:34 PDT
<
http://www.quirksmode.org/blog/archives/2005/08/addevent_consid.html
>: "addEventListener and attachEvent should not be considered equal". This talks about the meaning of "this" keyword; looking at the documentation, the bubbling/canceling traits of similar IE and W3C events are also different.
Anders Carlsson
Comment 4
2006-06-04 09:48:01 PDT
We don'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
Dave Hyatt
Comment 5
2006-06-04 11:33:44 PDT
This is one of those areas I'm nervous about supporting.
Dave Hyatt
Comment 6
2006-06-04 11:34:29 PDT
If we added support for this, there are sites that would take us down the IE event handling code path. I'd rather wait to see if this is a real-world problem before adding support for it.
Justin Haygood
Comment 7
2007-02-19 20:16:36 PST
Couldn'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("load",function); // Works site does if( window.attachEvent ) window.attachEvent("load",function); // Doesn't, since window.attachEvent is "hidden".
Darin Fisher (:fishd, Google)
Comment 8
2007-08-20 19:47:48 PDT
here'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!
Maciej Stachowiak
Comment 9
2007-08-20 21:31:28 PDT
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's hard to be certain. As a side note, I believe Opera supports the IE event handling methods.
Alexey Proskuryakov
Comment 10
2007-09-26 07:01:32 PDT
(In reply to
comment #9
)
> Also, is there any way to quantify the risk of sites giving us the > 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, <
http://dev.rubyonrails.org/ticket/6800
>.
David Kilzer (:ddkilzer)
Comment 11
2007-11-24 05:20:50 PST
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
Ian 'Hixie' Hickson
Comment 12
2007-11-26 13:05:29 PST
I don't understand the last comment -- Firefox doesn't support attachEvent(), and both Safari and Firefox are given attachEvent proxies in the aforementioned compat layer.
David Kilzer (:ddkilzer)
Comment 13
2007-11-26 13:09:33 PST
(In reply to
comment #12
)
> I don't understand the last comment -- Firefox doesn't support attachEvent(), > and both Safari and Firefox are given attachEvent proxies in the aforementioned > compat layer.
Perhaps the compat layer is not being activated with Safari 3, then. Sorry...didn't look very deeply into the JavaScript code.
David Kilzer (:ddkilzer)
Comment 14
2007-11-26 13:48:11 PST
(In reply to
comment #13
)
> (In reply to
comment #12
) > > I don't understand the last comment -- Firefox doesn't support attachEvent(), > > and both Safari and Firefox are given attachEvent proxies in the aforementioned > > compat layer. > > Perhaps the compat layer is not being activated with Safari 3, then. > Sorry...didn't look very deeply into the JavaScript code.
And this would be
Bug 13546
!
Rui Jiang
Comment 15
2008-01-25 17:12:47 PST
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)
Andy Estes
Comment 16
2010-09-28 10:27:20 PDT
<
rdar://problem/7867748
>
Anne van Kesteren
Comment 17
2010-09-29 02:04:49 PDT
(In reply to
comment #9
)
> As a side note, I believe Opera supports the IE event handling methods.
We are in the process of removing support for these.
Ahmad Saleem
Comment 18
2022-06-14 15:29:16 PDT
Can this bug be closed since even IE11 dropped the support for "attachEvent" 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
)
Ryosuke Niwa
Comment 19
2022-06-14 16:41:00 PDT
Yeah, this is "won't fix"
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug