Example usage for com.google.gwt.dom.client Node hasParentElement

List of usage examples for com.google.gwt.dom.client Node hasParentElement

Introduction

In this page you can find the example usage for com.google.gwt.dom.client Node hasParentElement.

Prototype

@Override
    public boolean hasParentElement() 

Source Link

Usage

From source file:org.waveprotocol.wave.client.common.util.DomHelper.java

License:Apache License

/**
 * Remove nodes in the given range from the DOM
 * @param from/* w  ww.  j  av a  2 s.  com*/
 * @param toExcl
 */
public static void removeNodes(Node from, Node toExcl) {
    if (from == null || !from.hasParentElement()) {
        return;
    }
    for (Node n = from; n != toExcl && n != null;) {
        Node r = n;
        n = n.getNextSibling();
        r.removeFromParent();
    }
}

From source file:org.waveprotocol.wave.client.editor.content.ContentNode.java

License:Apache License

/**
 * @return true if the node is still attached w.r.t. the html implementation
 *///from w  ww  .  j  ava 2 s . c  o  m
public boolean isImplAttached() {
    // TODO(danilatos): Implement this as doing a filtered search up the filtered html tree
    Node nodelet = getImplNodelet();
    return nodelet != null && nodelet.hasParentElement();
}