Topic: eventHandler use nodeName for unobtrusive

Hello,

At this time i work with xajax for Joomla (i had created an plugin that works with Mvc)
I have build an calendar application. That means i have min. 365d*2 html tags the calendar is clickble with different functions

every Day-Tag add an onclick or mouseover attribute is not a good idea. Unobtrusive Javascript is important

the uncompressed_js contains

xajax.events.addHandler = function(element, sEvent, fun) {
    if (window.addEventListener) {
        xajax.events.addHandler = function(command) {
            command.fullName = 'addHandler';
            var element = command.id;
            var sEvent = command.prop;
            var fun = command.data;
            if ('string' == typeof element)
                element = xajax.$(element);
            sEvent = xajax.tools.stripOnPrefix(sEvent);
            eval('element.addEventListener("' + sEvent + '", ' + fun + ', false);');
            return true;
        }
    } else {
        xajax.events.addHandler = function(command) {
            command.fullName = 'addHandler';
            var element = command.id;
            var sEvent = command.prop;
            var fun = command.data;
            if ('string' == typeof element)
                element = xajax.$(element);
            sEvent = xajax.tools.addOnPrefix(sEvent);
            eval('element.attachEvent("' + sEvent + '", ' + fun + ', false);');
            return true;
        }
    }
    return xajax.events.addHandler(element, sEvent, fun);
}

only the $.() option is available. I think with some small changes this functions attach Events to Node

So we can use an "domreader" getElementsByClassname ...what ever
and using this existing
xajax.events.addHandler.
this saves a little bit of code.
and xajax.events.addHandler will be get an shining.

Thanx and greetz
roman