history.js
function maybeBindToGlobal(func) {
    if (func && global &&
        global['EventTarget'] &&
        typeof global['EventTarget'].prototype.addEventListener === 'function' &&
        typeof func.bind === 'function') {
      return func.bind(global);
    }
    return func;
  }
function maybeBindToGlobal(func) {
    if (func && global &&
        global['EventTarget'] &&
        typeof global['EventTarget'].prototype.addEventListener === 'function' &&
        typeof func.bind === 'function') {
      return func.bind(global);
    }
    return func;
  }
function maybeBindToGlobal ( func ) { if ( func && global && global [ 'EventTarget' ] && typeof global [ 'EventTarget' ] . prototype . addEventListener === 'function' && typeof func . bind === 'function' ) { return func . bind ( global ) ; } return func ; }
This method attempts to bind a function to global.

@param {Function} [func] The function to be bound
@return {Function} Returns the bound function or func
This method attempts to bind a function to global .