public static class ScriptInjector.FromString extends Object
Constructor and Description |
---|
FromString(String scriptBody) |
Modifier and Type | Method and Description |
---|---|
JavaScriptObject |
inject()
Injects a script into the DOM.
|
ScriptInjector.FromString |
setRemoveTag(boolean removeTag) |
ScriptInjector.FromString |
setWindow(JavaScriptObject window) |
public FromString(String scriptBody)
scriptBody
- The script text to install into the document.public JavaScriptObject inject()
public ScriptInjector.FromString setRemoveTag(boolean removeTag)
removeTag
- If true, remove the tag immediately after injecting the
source. This shrinks the DOM, possibly at the expense of
readability if you are debugging javaScript.
Default value is true
.public ScriptInjector.FromString setWindow(JavaScriptObject window)
window
- Specify which window to use to install the script. If not
specified, the top current window GWT is loaded in is used.Copyright © 2018. All rights reserved.