It is often desirable to capture events on bubble and interrogate the EventTarget using a hasClassName function to see if it has a className that the program is concerned with.[...]
HTML5 already has the functionality you request in form of the classList DOM attribute on HTML elements.
-- Anne van Kesteren <http://annevankesteren.nl/> <http://www.opera.com/>