Package org.htmlunit
Class ScriptResult
java.lang.Object
org.htmlunit.ScriptResult
This object contains the result of executing a chunk of script code.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the object that was the output of the script engine.static booleanisFalse(ScriptResult scriptResult) Utility method testing if a script result isfalse.static booleanisUndefined(ScriptResult scriptResult) Utility method testing if a script result is undefined (there was no return value).toString()
-
Constructor Details
-
ScriptResult
Creates a new instance.- Parameters:
javaScriptResult- the object that was returned from the script engine
-
-
Method Details
-
getJavaScriptResult
Returns the object that was the output of the script engine.- Returns:
- the result from the script engine
-
toString
-
isFalse
Utility method testing if a script result isfalse.- Parameters:
scriptResult- a script result (may benull)- Returns:
trueifscriptResultisfalse
-
isUndefined
Utility method testing if a script result is undefined (there was no return value).- Parameters:
scriptResult- a script result (may benull)- Returns:
trueifscriptResultis undefined (there was no return value)
-