public static class ScriptInjector.FromUrl extends java.lang.Object
|Modifier and Type||Method and Description|
Specify a callback to be invoked when the script is loaded or loading encounters an error.
This call allows you to specify which DOM window object to install the script tag in.
public ScriptInjector.FromUrl setCallback(Callback<java.lang.Void,java.lang.Exception> callback)
Known bugs: This class uses the script tag's
callback to attempt to invoke onFailure() if the
browser detects a load failure. This is not reliable on all browsers
(Doesn't work on IE or Safari 3 or less).
On Safari version 3 and prior, the onSuccess() callback may be invoked even when the load of a page fails.
To support failure notification on IE and older browsers, you should check some side effect of the script (such as a defined function) to see if loading the script worked and include timeout logic.
callback- callback that gets invoked asynchronously.
public ScriptInjector.FromUrl setRemoveTag(boolean removeTag)
false, but this may change in a future release.
window- Specifies which window to install in.