### bind this helper binds to one element and returns a function that unbinds from that element.
325223
function (el, ev, callback, queue) {

    canEvent.on.call(el, ev, callback, queue);

	return function () {
        canEvent.off.call(el, ev, callback, queue);
	};
}
1364827
function (type, fun) {
            this.each(function (inx, ele) {
                vQ.unbind(ele, type, fun);
            });
            return this;
        }
136584
public void unbindExternalFunction(String funcName) throws Exception {
		ifAsyncWeCant("unbind an external a function");
		Assert(externals.containsKey(funcName), "Function '" + funcName + "' has not been bound.");
		externals.remove(funcName);
	}
1071763
function unset(name, element, previous) {
  if (unset.handlers[name]) {
    unset.handlers[name](name, element, previous);
  } else {
    element[name] = null;
  }
}
845061
function unbindSwipeStart() {
      Binder.off(START_EVENTS[0], Components.Html.wrapper, capture);
      Binder.off(START_EVENTS[1], Components.Html.wrapper, capture);
    }
35030
function()
	{
		this._destroyBinding();

		if(this._collectionBinder) this._collectionBinder.destroyBoundViews();

		this._modelBindersMap = null;
		this._collectionBinder = null;
		this._bindingIndex = null;
		this._itemAlias = null;

		this.element.removeAttribute(settings.DATA_RENDERED_ATTR);
		this.undelegateEvents();
		this.destroySubviews();
		if(this.dispatcher)
		{
			this.dispatcher.off('refresh', this.f('refreshAll'));
			this.dispatcher.off('refreshFromRoot', this.f('refreshFromRoot'));
			this.dispatcher.off('refreshRaf', this.f('requestRefreshAll'));
			this.dispatcher.off('refreshFromRootRaf', this.f('requestRefreshAllFromRoot'));
			this.dispatcher.off('dispatcher:noaction', this.f('_dispatchNoAction'));
		}

		if(this.destroy !== noop) this.destroy();
		if(typeof this.afterDestroy === 'function') this.afterDestroy();

		this._subviewsStruct = null;
		this._explicitSubviewsStruct = null;
		this.subviews = null;
		this._isRunning = false;
		this._isSuspended = false;
	}
606370
function unbindFromStrings(target, entity, evt, methods){
    var methodNames = methods.split(/\s+/);

    _.each(methodNames,function(methodName) {
      var method = target[methodName];
      target.stopListening(entity, evt, method, target);
    });
  }
154616
def rebind(self, tks):
        
        self._tks = tks
        for tk in self._tks:
            tk.unbind_all(self._tk_event)
            func_id = tk.bind(self._tk_event, self._event_callback)
            self._func_ids.append(func_id)
331138
function bindMethod(
  target: DecoratorTarget,
  name: string,
  descriptor: Descriptor,
): Descriptor {
  const func = getValueFunc('bind', descriptor);

  return {
    configurable: true,
    enumerable: false,
    get() {
      // This happens if someone accesses the property directly on the prototype
      // Thanks to jayphelps/core-decorators.js for the snippet
      if (this === target) {
        return func;
      }

      // The `this` here is the current class prototype
      // While `target` is the parent class prototype
      const boundFunc = func.bind(this);

      // Define a function on the target so that `get()` is only called once
      // Inherit the original methods descriptor as well
      Object.defineProperty(this, name, {
        ...descriptor,
        enumerable: true,
        value: boundFunc,
      });

      return boundFunc;
    },
    set(value) {
      Object.defineProperty(this, name, {
        ...descriptor,
        value,
      });
    },
  };
}
547538
function unbindEventListeners(instanceData) {

		var eventDelegates = instanceData.eventDelegates;

		for (var i = 0; i < eventDelegates.length; i++) {
			eventDelegates[i].detachEvents();
		}

		instanceData.eventDelegates = [];
	}
1216935
function () {
                this.$assert(838, this._listenersStopped !== true);
                this._listenersStopped = true;
                var bindings = this._bindings;
                if (bindings) {
                    // remove binding
                    for (var index = 0, bind; bind = bindings[index]; index++) {
                        // remove the recursive listener
                        this.__json.removeListener(bind.inside, bind.to, bind.callback, bind.recursive);
                    }
                }
            }
1130593
function BindToEventDecorator(_event, _target, _listenIn, _removeIn) {
  return function(propertyName, func) {
    const scope = this;
    const event = _event || propertyName;
    const target = !_target ? this.el : document.querySelector(_target);
    if (!target) {
      console.warn("Couldn't subscribe "+this.name+"."+propertyName+" to "+event+" on "+_target
        +" because querySelector returned undefined.");
      return;
    }
    const listenIn = _listenIn || "init";
    const removeIn = _removeIn || "remove";

    const listenFunc = this[listenIn];
    const removeFunc = this[removeIn];
    const boundFunc = func.bind(this);
    
    this[listenIn] = function() {
      if (listenFunc !== undefined) {
        listenFunc.apply(scope, arguments);
      }
      target.addEventListener(event, boundFunc);
    }

    this[removeIn] = function() {
      if (removeFunc !== undefined) {
        removeFunc.apply(scope, arguments);
      }
      target.removeEventListener(event, boundFunc);
    }

    return func;
  }
}
202846
function unbindEventListeners(instanceData) {
		for (var type in instanceData.eventHandlers) {
			if (instanceData.eventHandlers.hasOwnProperty(type)) {
				$(instanceData.element).off(type, instanceData.eventHandlers[type]);
			}
		}

		instanceData.eventHandlers = {};
	}
60883
function clickOutside(elements, fn) {
  const self = {
    on,
    off,
    isClicked
  };

  let clickedEl;
  let handlers;

  function stop(e) {
    clickedEl = this;
    e.stopPropagation();
  }

  function pass() {
    clickedEl = undefined;
    fn();
  }

  function isClicked(el) {
    return el === clickedEl;
  }

  function on() {
    const html = document.documentElement;
    handlers = elements.map(function(el) {
      const handler = stop.bind(el);
      el.addEventListener('mousedown', handler);
      return handler;
    });
    html.addEventListener('mousedown', pass);
    return self;
  }

  function off() {
    const html = document.documentElement;
    html.removeEventListener('mousedown', pass);
    elements.forEach(function(el, i) {
      el.removeEventListener('mousedown', handlers[i]);
    });
    return self;
  }

  return self;
}
1354881
function bind(elements) {
      for (var i = 0; i < elements.length; i++) {
        Binder.on('click', elements[i], this.click);
        Binder.on('touchstart', elements[i], this.click, capture);
      }
    }
1088979
function bind( fn, scope ) {
    var bound, args;
    if ( fn.bind === nativeBind && nativeBind ) return nativeBind.apply( fn, Array.prototype.slice.call( arguments, 1 ) );
    args = Array.prototype.slice.call( arguments, 2 );
    // @todo: don't link this
    bound = function() {
        if ( !(this instanceof bound) ) return fn.apply( scope, args.concat( Array.prototype.slice.call( arguments ) ) );
        W.ctor.prototype = fn.prototype;
        var self = new ctor();
        var result = fn.apply( self, args.concat( Array.prototype.slice.call( arguments ) ) );
        if ( Object( result ) === result ) return result;
        return self;
    };
    return bound;
}
913171
function bind() {
      var _this2 = this;

      Binder.on('mouseover', Components.Html.root, function () {
        _this2.stop();
      });

      Binder.on('mouseout', Components.Html.root, function () {
        _this2.start();
      });
    }