Event Delegation for Prototype
Today I’d like to present my own rendition of an Event Delegator class based on Prototype. Event Delegation can be used to improve performance and code simplicity by observing one parent element and triggering events on the children when applicable rather than observing each child element individually.
This was actually written back in July ’08, but I’d like to post it here now. It could use a little more thorough documentation, but here it is: