function one(elem, type, fn) {
  if (Array.isArray(type)) {
    return _handleMultipleEvents(one, elem, type, fn);
  }
  var func = function func() {
    off(elem, type, func);
    fn.apply(this, arguments);
  };

  // copy the guid to the new function so it can removed using the original function's ID
  func.guid = fn.guid = fn.guid || newGUID();
  on(elem, type, func);
}
function one(elem, type, fn) {
  if (Array.isArray(type)) {
    return _handleMultipleEvents(one, elem, type, fn);
  }
  var func = function func() {
    off(elem, type, func);
    fn.apply(this, arguments);
  };

  
  func.guid = fn.guid = fn.guid || newGUID();
  on(elem, type, func);
}
function one ( elem , type , fn ) { if ( Array . isArray ( type ) ) { return _handleMultipleEvents ( one , elem , type , fn ) ; } var func = function func ( ) { off ( elem , type , func ) ; fn . apply ( this , arguments ) ; } ; // copy the guid to the new function so it can removed using the original function's ID func . guid = fn . guid = fn . guid || newGUID ( ) ; on ( elem , type , func ) ; }
Trigger a listener only once for an event

@param {Element|Object} elem
Element or object to bind to.

@param {string|string[]} type
Name/type of event

@param {Event~EventListener} fn
Event Listener function
Trigger a listener only once for an event