Package org.htmlunit
Class ScriptResult
- java.lang.Object
-
- org.htmlunit.ScriptResult
-
public final class ScriptResult extends java.lang.Object
This object contains the result of executing a chunk of script code.
-
-
Constructor Summary
Constructors Constructor Description ScriptResult(java.lang.Object javaScriptResult)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getJavaScriptResult()
Returns the object that was the output of the script engine.static boolean
isFalse(ScriptResult scriptResult)
Utility method testing if a script result isfalse
.static boolean
isUndefined(ScriptResult scriptResult)
Utility method testing if a script result is undefined (there was no return value).java.lang.String
toString()
-
-
-
Method Detail
-
getJavaScriptResult
public java.lang.Object getJavaScriptResult()
Returns the object that was the output of the script engine.- Returns:
- the result from the script engine
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isFalse
public static boolean isFalse(ScriptResult scriptResult)
Utility method testing if a script result isfalse
.- Parameters:
scriptResult
- a script result (may benull
)- Returns:
true
ifscriptResult
isfalse
-
isUndefined
public static boolean isUndefined(ScriptResult scriptResult)
Utility method testing if a script result is undefined (there was no return value).- Parameters:
scriptResult
- a script result (may benull
)- Returns:
true
ifscriptResult
is undefined (there was no return value)
-
-