private static void orphan(Node node) { node.getParentNode().removeChild(node); }
public void execute() { if (!canHaveMultipleRequestsForSameId) { // If there can me multiple requests for a particular ID, then we // don't want to unregister the callback since there may be pending // requests that have not yet come back and we don't want them to // have an undefined callback function. unregisterCallbacks(CALLBACKS, callbackId); } Node script = Document.get().getElementById(callbackId); if (script != null) { // The script may have already been deleted getHeadElement().removeChild(script); } } });
/** * Removes the child node indicated by <code>oldChild</code> from the list * of children, and returns it. * @param oldChild The node being removed. * @return The node removed. * @exception DOMException * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of * this node. * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>, * this exception might be raised if the DOM implementation doesn't * support the removal of the <code>DocumentType</code> child or the * <code>Element</code> child. */ public final OMNode removeChild(OMNode oldChild) throws JavaScriptException { ot.removeChild(oldChild.ot); return oldChild; }
/** * Removes the child node indicated by <code>oldChild</code> from the list * of children, and returns it. * @param oldChild The node being removed. * @return The node removed. * @exception DOMException * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. * <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of * this node. * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>, * this exception might be raised if the DOM implementation doesn't * support the removal of the <code>DocumentType</code> child or the * <code>Element</code> child. */ public final OMNode removeChild(OMNode oldChild) throws JavaScriptException { ot.removeChild(oldChild.ot); return oldChild; }
hiddenDiv.appendChild(element); wrapInitializationCallback.execute(); element.getParentNode().removeChild(element);
@Override public Node remove(int index) { Node child = n.getChild(index); n.removeChild(child); return child; }
private static void orphan(Node node) { node.getParentNode().removeChild(node); }
private static void orphan(Node node) { node.getParentNode().removeChild(node); }
@Override public void onRemove(Object3D object) { if (element.getParentNode() != null) { element.getParentNode().removeChild(element); } } });
static Node insertAtIndex(Node parent, Node newChild, int index) { List<Node> list = JsoUtils.getChildNodeInnerList(parent); // First, remove from old parent Node oldParent = newChild.getParentNode(); if (oldParent != null) { oldParent.removeChild(newChild); } // Then, add if (index == -1 || index >= list.size()) { list.add(newChild); } else { list.add(index, newChild); } // Manage getParentNode() JsoUtils.setParentNode(newChild, parent); return newChild; }
static Node insertAtIndex(Node parent, Node newChild, int index) { List<Node> list = JsoUtils.getChildNodeInnerList(parent); // First, remove from old parent Node oldParent = newChild.getParentNode(); if (oldParent != null) { oldParent.removeChild(newChild); } // Then, add if (index == -1 || index >= list.size()) { list.add(newChild); } else { list.add(index, newChild); } // Manage getParentNode() JsoUtils.setParentNode(newChild, parent); return newChild; }
public void execute() { if (!canHaveMultipleRequestsForSameId) { // If there can me multiple requests for a particular ID, then we // don't want to unregister the callback since there may be pending // requests that have not yet come back and we don't want them to // have an undefined callback function. unregisterCallbacks(CALLBACKS); } Node script = Document.get().getElementById(callbackId); if (script != null) { // The script may have already been deleted getHeadElement().removeChild(script); } } });
public void execute() { if (!canHaveMultipleRequestsForSameId) { // If there can me multiple requests for a particular ID, then we // don't want to unregister the callback since there may be pending // requests that have not yet come back and we don't want them to // have an undefined callback function. unregisterCallbacks(CALLBACKS); } Node script = Document.get().getElementById(callbackId); if (script != null) { // The script may have already been deleted getHeadElement().removeChild(script); } } });
/** * Removes all child nodes from the given element. */ protected void removeAllChildNodes(Node elem) { NodeList<Node> childNodes = elem.getChildNodes(); for (int i = childNodes.getLength() - 1; i >= 0; i--) { elem.removeChild(childNodes.getItem(i)); } }
@PatchMethod static JavaScriptObject removeChild(JavaScriptObject jsObject, JavaScriptObject oldChildJs) { Node node = jsObject.cast(); Node oldChildNode = oldChildJs.cast(); return node.removeChild(oldChildNode); }
@PatchMethod static JavaScriptObject removeChild(JavaScriptObject jsObject, JavaScriptObject oldChildJs) { Node node = jsObject.cast(); Node oldChildNode = oldChildJs.cast(); return node.removeChild(oldChildNode); }
@PatchMethod static void replaceNode(UIObject uiObject, Element node, Element newNode) { Node parent = node.getParentNode(); if (parent != null) { parent.insertBefore(newNode, node); parent.removeChild(node); } }
@PatchMethod static void replaceNode(UIObject uiObject, Element node, Element newNode) { Node parent = node.getParentNode(); if (parent != null) { parent.insertBefore(newNode, node); parent.removeChild(node); } }
hiddenDiv.appendChild(element); wrapInitializationCallback.execute(); element.getParentNode().removeChild(element);
hiddenDiv.appendChild(element); wrapInitializationCallback.execute(); element.getParentNode().removeChild(element);