List of usage examples for com.google.gwt.dom.client ScriptElement is
public static boolean is(Node node)
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; }