Know your (event) sources
A loooong time ago I wrote this tutoral on JavaScript events, in which I included a cross-browser event handling script called addEvent
.
Today, Peter-Paul Koch: addEvent Considered Harmful. And he's right, you can get into all kinds of headaches using IE's attachEvent
method, as my own addEvent
snippet does. Be sure to read the ensuing comment thread for some interesting alternative approaches.
Caveat implementor, my friends.
PS: I'm rather pleased that something I wrote merits a "considered harmful" treatise! I'm in good company.
3 Comments:
Thanks for creating these functions in the first place. They were - and still are - a great starting point for writing unobtrusive JavaScript. Hopefully there'll be a fix found for "this" particular problem.
Hi Thanks for your interesting blog. I also have a blog/site, covering buster voip related stuff. Feel free to visit my buster voip site.
Hi
Please can any one help me to manage a stick up footer on the website for IE 5.0 +. I Think its with CSS or Javascript r both.
As you can see 1 on http://www.bmw.co.uk
thanks
Imran Hashmi
Post a Comment
<< Home