Undo attachment of event
346497
function removeEvent ( namespacedEvent ) {

            var event = namespacedEvent && namespacedEvent.split('.')[0];
            var namespace = event && namespacedEvent.substring(event.length);

            Object.keys(scope_Events).forEach(function( bind ){

                var tEvent = bind.split('.')[0],
                    tNamespace = bind.substring(tEvent.length);

                if ( (!event || event === tEvent) && (!namespace || namespace === tNamespace) ) {
                    delete scope_Events[bind];
                }
            });
        }
1359922
function( bindingPoint ){
    var att = this.attachments[bindingPoint.toString()];
    if( att !== undefined ){
      var index = this.attachmentsList.indexOf( att );
      this.attachmentsList.splice( index, 1 );
      att._detach( bindingPoint );
    }
    delete this.attachments[bindingPoint.toString()];
  }
925399
def undo(self, editor):
        """"""
        inst = self.timemachine
        if not self.is_revertible:
            raise DisciplineException("You tried to undo a non-revertible action! "
                               "Check action.is_revertible and action.undo_errors"
                               " before trying to undo.")

        if self.action_type == "dl":
            obj = inst.restore()
            self.reverted = save_object(obj, editor)
            self.save()
        elif self.action_type == "md":
            # Restore as it was *before* the modification
            obj = inst.at_previous_action.restore()
            self.reverted = save_object(obj, editor)
            self.save()
        else:
            editor.delete_object(inst.get_object())
            # This is safe from race conditions but still a pretty inelegant
            # solution. I can't figure out a different way to find the last action
            # for now
            self.reverted = DeletionCommit.objects.filter(
                object_uid = self.object_uid
            ).order_by("-action__id")[0].action
            self.save()
102255
function() {
		// If running in Node.js, don't teardown.
		if(isNode()) {
			return;
		}

		var document = getDocument(),
			window = getGlobal();

		domEvents.removeDelegateListener(document.documentElement, "click", "a", this.anchorClickHandler);

		// Reset the changed `window.history` methods to their original values.
		canReflect.eachKey(methodsToOverwrite, function(method) {
			window.history[method] = this.originalMethods[method];
		}, this);

		domEvents.removeEventListener(window, "popstate", this.dispatchHandlers);
	}
837047
function (el, event, fn) {
				if (typeof el.removeEventListener === "function") {
					el.removeEventListener(event, fn, false);
				} else if (el.detachEvent) {
					el.detachEvent("on" + event, fn);
				}
			}
944890
function(element, selector, event, callback, capturePhase) {

    unbind($(element).array[0], event, callback, capturePhase)
  }
964894
function() {
        OpenLayers.Element.removeClass(document.body, "olDragDown");
        this.documentEvents = false;
        OpenLayers.Event.stopObserving(document, "mousemove", this._docMove);
        OpenLayers.Event.stopObserving(document, "mouseup", this._docUp);
    }
406665
function () {
        var self = this, name;

        if (self.delegates) {
          for (name in self.delegates) {
            self.dom.unbind(getEventTarget(self, name), name, self.delegates[name]);
          }

          delete self.delegates;
        }

        if (!self.inline) {
          self.getBody().onload = null;
          self.dom.unbind(self.getWin());
          self.dom.unbind(self.getDoc());
        }

        self.dom.unbind(self.getBody());
        self.dom.unbind(self.getContainer());
      }
1025626
function() {
			var self = this;

			self._frame.on( 'insert', function() {
				var selection   = self._frame.state().get( 'selection' );
				var attachments = selection.models.map( function( model ) {
					return _.extend( {}, model.toJSON() );
				});
				var attachment  = _.extend( {}, selection.first().toJSON() );

				self._setAttachment( attachment );

				$( document ).trigger( 'wpMediaPicker.insert', [ attachments, self ] );
			});

			self._open_button.on( 'click', function() {
				var selection = self._frame.state( 'insert' ).get( 'selection' );
				selection.reset( self._attachment ? [ self._attachment ] : [] );

				self.open();
			});

			self._remove_button.on( 'click', function() {
				self._setAttachment( null );
			});
		}
512345
function(e) {
            Y.each(_wrappers, function(v, k) {
                v.detachAll();
                remove(v.el, v.type, v.fn, v.capture);
                delete _wrappers[k];
                delete _el_events[v.domkey][k];
            });
        }
68852
function deleteDelegatedHandler(eventOptions = {}) {
    const { key } = eventOptions;
    const def = defs.get(this);

    if (key && key in def.keys) {
        triggerOne(this, '_asterisk:remove', eventOptions);
    }
}
984865
function() {
			var events	= this.events;
			if (!events) { return this; }

			var tag		= this.tag,
				prefix	= '',
				method	= 'removeEventListener';


			// Round and round we go...
			if (!tag.removeEventListener) {
				prefix = 'on';
				method = 'detachEvent';
			}

			tag[method](prefix + 'error', events.failed);
			tag[method](prefix + 'load', events.loaded);
			tag[method](prefix + 'readystatechange', events.state);

			delete this.events;
			return this;
		}
57721
function() {
        Object.keys(this.events).forEach(function(eventName) {
            var useCapture = CAPTURED_EVENTS.indexOf(eventName) > -1;
            this.el.removeEventListener(eventName, this._onEvent, useCapture);
        }, this);

        this.context = null;
        this.el = null;
        this.events = null;
    }
1365259
function removeEventListener(el, eventName, handler) {
    if (window.jQuery) {
      $(el).off(eventName, handler);
    } else if (el.removeEventListener) {
      el.removeEventListener(eventName, handler);
    } else {
      el.detachEvent('on' + eventName, handler);
    }
  }
476307
function() {
				// Cleanup the element.
				this.removeClass( 'cke_editable' );

				this.status = 'detached';

				// Save the editor reference which will be lost after
				// calling detach from super class.
				var editor = this.editor;

				this._.detach();

				delete editor.document;
				delete editor.window;
			}
532463
function unbindEvents(target, events, listener) {
    events.split(' ').forEach(function (event) {
        return target.removeEventListener(event, listener, false);
    });
}
1294615
def onpress(self, event):
        
        if event.key == 'c':  # clears all the contours
            for patch in self.region_patches:
                patch.remove()
            self.region_patches = []
            self.fig.canvas.draw_idle()
        elif event.key == "u":  # undo a label
            self.undobutton_action()