remove event listeners
7675
function(target, events) {
      for (var i = 0, l = events.length, e; (i < l) && (e = events[i]); i++) {
        this.removeEvent(target, e);
      }
    }
856548
function _off(sel, evt, fn) {
    $each(_bound(sel, evt, fn), (e) => {
        if (`on${e.evt}` in _doc) {
            e.el.removeEventListener(e.evt, e.cb);
        } else if (custom[e.evt]) {
            custom[e.evt][1](e.el, e.cb);
        }

        bound.splice(bound.indexOf(e), 1);
    });
}
575322
def off(self, event, handler=None):
        """"""
        if handler:
            self.events[event].off(handler)
        else:
            del self.events[event]
            delattr(self, event)
1000200
function(eventName, handler) {
    if (!this.__eventListeners) {
      this.__eventListeners = { };
    }
    if (this.__eventListeners[eventName]) {
      fabric.util.removeFromArray(this.__eventListeners[eventName], handler);
    }
  }
939760
function removeListener(attr,func,child,update)
        {
          if(typeof func !== 'function') return bind;

          var isInput = (['value','checked'].indexOf(attr) !== -1),
              isStyle = (_allStyles.indexOf(attr) !== -1),
              listeners,
              x;

              function cut(attr,list)
              {
                var listenerFuncs = list[attr],
                    len = listenerFuncs.length;
                for(x=0;x<len;x++)
                {
                  if(listenerFuncs[x].toString() === func.toString())
                  {
                    listenerFuncs.splice(x,1);
                  }
                }
              }

          if(this.toString() !== bind.toString())
          {
            if(child)
            {
              var children = this.querySelectorAll('*'),
                  len = children.length;
              if(isStyle)
              {
                listeners = (update ? '_childStyleUpdateListeners' : '_childStyleListeners');
                cut(attr,this.attrListeners()[listeners]);
                listeners = (update ? '_parentStyleUpdateListeners' : '_parentStyleListeners');
              }
              else
              {
                if(attr === _all)
                {
                  listeners = (update ? '_childStyleUpdateListeners' : '_childStyleListeners');
                  cut(attr,this.attrListeners()[listeners]);
                }
                listeners = (update ? '_childAttrUpdateListeners' : '_childAttrListeners');
                cut(attr,this.attrListeners()[listeners]);
                listeners = (update ? '_parentAttrUpdateListeners' : '_parentAttrListeners');
              }
              for(x=0;x<len;x++)
              {
                var parents = children[x].attrListeners()[listeners][attr],
                    parentLen = parents.length;
                for(var i=0;i<parentLen;i++)
                {
                  if(parents[i].isEqualNode(this))
                  {
                    parents.slice(i,1);
                  }
                }
                if(attr === _all)
                {
                  listenersStyle = (update ? '_parentStyleUpdateListeners' : '_parentStyleListeners');
                  var parents = children[x].attrListeners()[listeners][attr],
                      parentLen = parents.length;
                  for(var i=0;i<parentLen;i++)
                  {
                    if(parents[i].isEqualNode(this))
                    {
                      parents.slice(i,1);
                    }
                  }
                }
              }
            }
            else
            {
              if(isStyle)
              {
                listeners = (update ? '_styleUpdateListeners' : '_styleListeners');
                cut(attr,this.attrListeners()[listeners]);
              }
              else
              {
                if(attr === _all)
                {
                  listeners = (update ? '_styleUpdateListeners' : '_styleListeners');
                  cut(attr,this.attrListeners()[listeners]);
                }
                listeners = (update ? '_attrUpdateListeners' : '_attrListeners');
                cut(attr,this.attrListeners()[listeners]);
              }
            }
          }
          else
          {
            if(isStyle)
            {
              listeners = (update ? _styleUpdateListeners : _styleListeners);
              cut(attr,listeners);
            }
            else
            {
              if(attr === _all)
              {
                listeners = (update ? _styleUpdateListeners : _styleListeners);
                cut(attr,listeners);
              }
              listeners = (update ? _attrUpdateListeners : _attrListeners);
              cut(attr,listeners);
            }
          }
        }
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;
}
403952
function (e) {
                // call unload listeners
                // Keep a local copy of the reference to unloadListeners because it is possible that a listener calls
                // aria.utils.Event.reset (that's what AriaWindow is doing).
                var list = unloadListeners.slice();
                for (var i = 0, len = list.length; i < len; ++i) {
                    var l = list[i];
                    if (l) {
                        l[CB].call(this.getEvent(e));
                        list[i] = null;
                        l = null;
                    }
                }
                list = null;
            }
517904
function unbind(el, type, fn, capt) {
	el.removeEventListener(type.slice(2), fn, capt);
}
1188045
function()
		{
			var nativeListeners = this.getCustomData( '_cke_nativeListeners' );
			for ( var eventName in nativeListeners )
			{
				var listener = nativeListeners[ eventName ];
				if ( this.$.detachEvent )
					this.$.detachEvent( 'on' + eventName, listener );
				else if ( this.$.removeEventListener )
					this.$.removeEventListener( eventName, listener, false );

				delete nativeListeners[ eventName ];
			}
		}
33547
def removeEventListener(self, event: str, listener: _EventListenerType
                            ) -> None:
        
        self._remove_event_listener(event, listener)
622486
function (object, event, callback) {
        var index = this.indexOf(object);
        var listener = this.listeners[index];
        if (listener) {
            var callbacks = listener.events[event];
            if (callbacks) {
                var index = callbacks.indexOf(callback);
                if (index != -1) {
                    callbacks.splice(index, 1);
                }

                // remove the array when empty
                if (callbacks.length == 0) {
                    delete listener.events[event];
                }
            }

            // count the number of registered events. remove listener when empty
            var count = 0;
            var events = listener.events;
            for (var e in events) {
                if (events.hasOwnProperty(e)) {
                    count++;
                }
            }
            if (count == 0) {
                delete this.listeners[index];
            }
        }
    }
660832
function removeMenuItemEventListeners(menuItem) {
        menuItem._command
            .off("enabledStateChange", menuItem._enabledChanged)
            .off("checkedStateChange", menuItem._checkedChanged)
            .off("nameChange", menuItem._nameChanged)
            .off("keyBindingAdded", menuItem._keyBindingAdded)
            .off("keyBindingRemoved", menuItem._keyBindingRemoved);
    }
929008
function unlistenArrayEvents(array, listener) {
	var stub = array._chartjs;
	if (!stub) {
		return;
	}

	var listeners = stub.listeners;
	var index = listeners.indexOf(listener);
	if (index !== -1) {
		listeners.splice(index, 1);
	}

	if (listeners.length > 0) {
		return;
	}

	arrayEvents.forEach(function(key) {
		delete array[key];
	});

	delete array._chartjs;
}
1003476
function remove() {
    primus.removeListener('error', remove)
          .removeListener('open', remove)
          .removeListener('end', remove)
          .timers.clear('connect');
  }
637551
function(element)
	{
		try
		{
			if (element != null)
			{
				mxEvent.removeAllListeners(element);
				
				var children = element.childNodes;
				
				if (children != null)
				{
			        var childCount = children.length;
			        
			        for (var i = 0; i < childCount; i += 1)
			        {
			        	mxEvent.release(children[i]);
			        }
			    }
			}
		}
		catch (e)
		{
			// ignores errors as this is typically called in cleanup code
		}
	}
207960
function () {
                if (unloadListeners) {
                    unloadListeners = null;
                    this._simpleRemove(Aria.$window, "unload", this._unload);
                }
                for (var index = listeners.length - 1; index >= 0; index--) {
                    var l = listeners[index];
                    if (l) {
                        this.removeListener(l[EL], l[TYPE], l[FN], index);
                    }
                }
            }
815108
function removeEventListeners(reference, state) {
  // Remove resize event listener on window
  getWindow(reference).removeEventListener('resize', state.updateBound);

  // Remove scroll event listener on scroll parents
  state.scrollParents.forEach(function (target) {
    target.removeEventListener('scroll', state.updateBound);
  });

  // Reset state
  state.updateBound = null;
  state.scrollParents = [];
  state.scrollElement = null;
  state.eventsEnabled = false;
  return state;
}