code: function (e) { 
                  var e = e || window.event; 
  
                  if (typeof callback === 'function') {
                      callback.call(ctx, e);
                  }
              }
docs: save anonymous function to be able to remove