code: function(element, eventName, func) {
          // For modern browsers use the standard DOM-compliant `addEventListener`.
          if (element.addEventListener) {
            element.addEventListener(eventName, func, false);
            // For older versions of Internet Explorer, use `attachEvent`.  
            // Also provide a fix for scoping `this` to the calling element and register each listener so the containing elements can be purged on page unload.
          } else if (element.attachEvent) {
            this.listeners.push(element);
            if (!this.memoryLeaking) {
              window.attachEvent('onunload', function() {
                if(this.listeners) {
                  for (var i = 0, ii = this.listeners.length; i < ii; i++) {
                    container[audiojs].events.purge(this.listeners[i]);
                  }
                }
              });
              this.memoryLeaking = true;
            }
            element.attachEvent('on' + eventName, function() {
              func.call(element, window.event);
            });
          }
        }
docs: **A simple cross-browser event handler abstraction**