src/util/events.js
function (obj, type, fn, scope) {
                scope = scope || obj;

                var wrappedFn = function (e) { fn.call(scope, e); };

                obj.addEventListener(type, wrappedFn, false);
                cache.push([obj, type, fn, wrappedFn]);
            }
function (obj, type, fn, scope) {
                scope = scope || obj;

                var wrappedFn = function (e) { fn.call(scope, e); };

                obj.addEventListener(type, wrappedFn, false);
                cache.push([obj, type, fn, wrappedFn]);
            }
Add an event to an object and optionally adjust it's scope

@param obj {HTMLElement} The object to attach the event to
@param type {string} The type of event excluding "on"
@param fn {function} The function
@param scope {object} Object to adjust the scope to (optional)