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

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

Introduction

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

Prototype

@Override
    public boolean hasAttribute(String name) 

Source Link

Usage

From source file:org.cruxframework.crux.core.client.utils.ScriptTagHandler.java

License:Apache License

private static ScriptElement cloneScript(ScriptElement script) {
    Document doc = Document.get();
    ScriptElement cloneScript = doc.createScriptElement();
    cloneScript.setType("text/javascript");
    cloneScript.setLang("javascript");
    if (script.hasAttribute("src")) {
        cloneScript.setSrc(script.getSrc());
    } else {/*from w w w  .j  a v  a 2s  .c o m*/
        getScriptInjector().copyScriptContent(script, cloneScript);
    }

    return cloneScript;
}