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 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).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:
true
ifscriptResult
isfalse
-
isUndefined
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)
-