Example usage for com.google.gwt.dom.client ScriptElement is

List of usage examples for com.google.gwt.dom.client ScriptElement is

Introduction

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

Prototype

public static boolean is(Node node) 

Source Link

Document

Determine whether the given Node can be cast to this class.

Usage

From source file:edu.caltech.ipac.firefly.ui.JSLoad.java

public void doneListener(Event ev) {
    JavaScriptObject source = ev.getEventTarget();
    if (_map.containsKey(source) && ScriptElement.is(source)) {
        _map.put(source, true);//  w w  w  .  j ava  2s . c o m
    } else {
        // some error here
    }
    if (isAllLoaded())
        allCompleteNotify();
}

From source file:nz.co.doltech.gwt.sdm.SuperDevCompiler.java

License:Apache License

public Element getDevModeOnScriptElement() {
    HeadElement head = Document.get().getHead();
    NodeList<Node> childNodes = head.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node childNode = childNodes.getItem(i);
        if (Element.is(childNode)) {
            Element child = childNode.cast();
            if (ScriptElement.is(child)) {
                ScriptElement scriptElement = ScriptElement.as(child);
                String scriptSrc = scriptElement.getSrc();
                if (scriptSrc != null && scriptSrc.contains("dev_mode_on.js")) {
                    return child;
                }//  w  w w.  jav a 2  s  . c  om
            }
        }
    }
    return null;
}