This method detach a widget of its parent without doing a physical
detach (DOM manipulation).
508915
public static void doLogicalDetachFromHtmlPanel(Widget w) {
    Widget parent = w.getParent();

    if (parent instanceof HTMLPanel) {
      complexPanelGetChildren((HTMLPanel) parent).remove(w);
      widgetSetParent(w, null);
    } else {
      throw new IllegalStateException(
          "You can only use this method to detach a child from an HTMLPanel");
    }
  }
1193976
function(root, force) {
    // Shift arguments around.
    if (typeof root === "boolean") {
      force = root;
      root = this;
    }

    // Allow removeView to be called on instances.
    root = root || this;

    // Iterate over all of the nested View's and remove.
    root.getViews().each(function(view) {
      // Force doesn't care about if a View has rendered or not.
      if (view.hasRendered || force) {
        LayoutManager._removeView(view, force);
      }

    // call value() in case this chain is evaluated lazily
    }).value();
  }
276426
protected void detach()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "detach");

    // Cleanly dispose of the getCursor
    getCursor.finished();
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "detach");
  }
1370921
public function detach() {
        if($this->__parent) {
            $this->__parent->offsetUnset($this->__name);
        }

        $this->__parent = NULL;
        $this->__name = NULL;
        return $this;
    }
1333088
protected boolean removeLogical(Widget w) {
		// Validate.
		if (w.getParent() != this) {
			return false;
		}
		// Orphan.
		try {
			orphan(w);
		} finally {
			// Logical detach.
			getChildren().remove(w);
		}
		return true;
	}
1283206
function detach() {
      prevented = true;

      if (!detached) {
        for (var i = 0; i < this.items.length; i++) {
          this.items[i].draggable = false;

          this.items[i].setAttribute('data-href', this.items[i].getAttribute('href'));

          this.items[i].removeAttribute('href');
        }

        detached = true;
      }

      return this;
    }
1332337
def unhook_drop(self):
        
        widget = self.widget
        widget.setAcceptDrops(False)
        del widget.dragEnterEvent
        del widget.dragMoveEvent
        del widget.dragLeaveEvent
        del widget.dropEvent
527746
def destroy(self):
        
        widget = self.widget
        if widget is not None:
            widget.removeFromSuperview()
        super(UiKitView, self).destroy()
699842
def child_removed(self, child):
        
        super(AbstractWidgetItemGroup, self).child_removed(child)
        self.get_member('_items').reset(self)
654947
public void remove( Widget w )
	{
		int index = indexOf( w );
		if( index == -1 )
		{
			throw new NoSuchElementException();
		}

		remove( index );
	}
1306921
public static void hideAndAfter(Element e, Widget widget) {
    assert e != null && widget != null;
    if ($(e).widget() != null && $(e).widget().isAttached()) {
      replaceWidget($(e).widget(), widget, false);
    } else {
      detachWidget(widget);
      hideAndAfter(e, widget.getElement());
      attachWidget(widget, getFirstParentWidget(widget));
    }
  }
1289522
function() {

		if (!this._is_inDOM) Lava.t("remove: widget is not in DOM");
		if (Lava.schema.DEBUG && !this._container) Lava.t("remove: widget doesn't have a container");

		this._is_inDOM = false;
		this._is_dirty = false;
		this._broadcastToChildren('broadcastRemove');

		if (this._container.isElementContainer && !this._container.isElementOwner()) {

			this._container.releaseElement();

		} else {

			this._container.remove()

		}

	}
935518
function () {
        YAHOO.util.Event.purgeElement(this.link);
        this.current.parentNode.removeChild(this.current);
        this.link = this.span = null;
    }
302242
public static void replaceOrAppend(Element e, Widget widget) {
    assert e != null && widget != null;
    if ($(e).widget() != null && $(e).widget().isAttached()) {
      replaceWidget($(e).widget(), widget, true);
    } else {
      detachWidget(widget);
      replaceOrAppend(e, widget.getElement());
      attachWidget(widget, getFirstParentWidget(widget));
    }
  }
864144
function () {
        YAHOO.util.Event.purgeElement(this.container,true);
        this.container.parentNode.removeChild(this.container);
        this.container = null;
    }
980857
function (detach) {
                var action = detach ? 'off' : 'on';
        
                if (s.params.zoom) {
                    var target = s.slides;
                    var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;
                    // Scale image
                    if (s.support.gestures) {
                        s.slides[action]('gesturestart', s.zoom.onGestureStart, passiveListener);
                        s.slides[action]('gesturechange', s.zoom.onGestureChange, passiveListener);
                        s.slides[action]('gestureend', s.zoom.onGestureEnd, passiveListener);
                    }
                    else if (s.touchEvents.start === 'touchstart') {
                        s.slides[action](s.touchEvents.start, s.zoom.onGestureStart, passiveListener);
                        s.slides[action](s.touchEvents.move, s.zoom.onGestureChange, passiveListener);
                        s.slides[action](s.touchEvents.end, s.zoom.onGestureEnd, passiveListener);
                    }
        
                    // Move image
                    s[action]('touchStart', s.zoom.onTouchStart);
                    s.slides.each(function (index, slide){
                        if ($(slide).find('.' + s.params.zoomContainerClass).length > 0) {
                            $(slide)[action](s.touchEvents.move, s.zoom.onTouchMove);
                        }
                    });
                    s[action]('touchEnd', s.zoom.onTouchEnd);
        
                    // Scale Out
                    s[action]('transitionEnd', s.zoom.onTransitionEnd);
                    if (s.params.zoomToggle) {
                        s.on('doubleTap', s.zoom.toggleZoom);
                    }
                }
            }
713651
function () {
    var self = this;

    // Remove child
    self.dropdownContainerView.remove();

    // Remove event listeners
    document.body.removeEventListener("click", self.deferClose);
    if (self.options.closeOnEsc) {
      document.body.removeEventListener("keyup", self.closeOnEsc);
    }
    self.$el.off("click", self.stopDeferClose);
    self.$dropdownButton.off("click", self.toggle);

    // Invoke original backbone methods
    return Backbone.View.prototype.remove.apply(self, arguments);
  }