469,286 Members | 2,466 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,286 developers. It's quick & easy.

IE passes event object to handler / Flanagan's blog

Hi,

It seems there is a long standing belief that in IE does not pass the
event object to the handler functions attached with attachevent() to a
DOM element. Coincidently, I was confused about a week ago by the fact
that an event object is, in fact, passed to the handler but I didn't
investigate this further. Now David Flanagan is organizing and effort
to figure out what is going on and where this belief came from. Perhaps
someone here knows what's going on and could head over to his blog and
explain the situation.

<URL http://www.davidflanagan.com>

Thank you,
Peter

Oct 27 '06 #1
1 1103
VK
It seems there is a long standing belief that in IE does not pass the
event object to the handler functions attached with attachevent() to a
DOM element.
The really long standing allusion on the matter is that attachEvent is
a buggy implemented equivalent of addEventListener so everyone is
trying to analyse it from this position.
In fact attachEvent and addEventListener are what I would call (as a
joke term) "homofuncs" by analogy with homophones.
Homophones are words that are pronounced alike even if they differ in
spelling, meaning, or origin, such as "pair" and "pear".
"Homofuncs" would be then programming entities from different
environments that are producing seemly similar results in some
particular usage despite they differ in their nature and real purpose.

This post explains it in details and with samples:
<http://groups.google.com/group/comp.lang.javascript/msg/78281e500f55079c>

The explanation to the attachEvent "argument" is that it is trying to
jump on the bound method in the global context of its behavior, but
there are neither first nor second so it's just a "poor lost baby".

I don't think that we should report it to Flanagan though you are
welcome to. Over years it became a well-established tradition to talk
about badly broken attachEvent method on IE. Maybe just keep it "entre
nous"?

Oct 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Christopher W. Douglas | last post: by
8 posts views Thread by moondaddy | last post: by
15 posts views Thread by RobG | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.