|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gargoylesoftware.htmlunit.ScriptResult
public final class ScriptResult
This object contains the result of executing a chunk of script code.
Constructor Summary | |
---|---|
ScriptResult(Object javaScriptResult,
Page newPage)
Creates a new instance. |
Method Summary | |
---|---|
static ScriptResult |
combine(ScriptResult newResult,
ScriptResult originalResult,
boolean ie)
Creates and returns a composite ScriptResult based on the two input ScriptResult s. |
Object |
getJavaScriptResult()
Returns the object that was the output of the script engine. |
Page |
getNewPage()
Returns the page that is loaded at the end of the script execution. |
static boolean |
isFalse(ScriptResult scriptResult)
Utility method testing if a script result is false. |
static boolean |
isUndefined(ScriptResult scriptResult)
Utility method testing if a script result is undefined (there was no return value). |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScriptResult(Object javaScriptResult, Page newPage)
javaScriptResult
- the object that was returned from the script enginenewPage
- the page that is currently loaded at the end of the script executionMethod Detail |
---|
public Object getJavaScriptResult()
public Page getNewPage()
public String toString()
toString
in class Object
public static boolean isFalse(ScriptResult scriptResult)
scriptResult
- a script result (may be null)
public static boolean isUndefined(ScriptResult scriptResult)
scriptResult
- a script result (may be null)
public static ScriptResult combine(ScriptResult newResult, ScriptResult originalResult, boolean ie)
ScriptResult
based on the two input ScriptResult
s. This
method defines how the return values for multiple event handlers are combined during event capturing and
bubbling. The behavior of this method varies based on whether or not we are emulating IE.
newResult
- the new ScriptResult
(may be null)originalResult
- the original ScriptResult
(may be null)ie
- whether or not we are emulating IE
ScriptResult
, based on the two input ScriptResult
s
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |