Event Capturing is near evil
If you're using a browser that implements the EventListener interface (W3 model), try this out for size
addEventListener useCapture
document.addEventListener('click', function(e) {
e.stopPropagation();
e.preventDefault();
}, true);
What do you think this will do? ...Yeah, you're right. If you have Firebug, copy the four lines above, then navigate to any webpage such as this one just for testing, open up your Firebug console command line, and paste it in there and run it. Now try clicking on any link in the document. Pretty sweet? Or almost near evil?
When Internet Explorer finally sports a W3 Event model, keep this little doozy in mind. I will admit, however, that there were times when I could have really used capturing, so don't get the wrong impression. Cheers.
recent
- Matador: The Obvious MVC Framework for Node
- Sandboxing JavaScript
- Crouching Ender, hidden command
- Ender.js - The open submodule library
- Qwery - The Tiny Selector Engine
- Klass
- Smallest DOMReady code, ever.
- $script.js - Another JavaScript loader
- About that slowness on Twitter...
- Autocomplete Fuzzy Matching
- JavaScript Cache Provider
- JavaScript Animate
- Asynchronous method queue chaining in JavaScript
- Something changed
- Unofficial Twitter Widget Documentation
i am dustin diaz

