Package org.htmlunit

# Class ScriptResult

java.lang.Object
org.htmlunit.ScriptResult

public final class ScriptResult extends Object
This object contains the result of executing a chunk of script code.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ScriptResult(Object javaScriptResult)`
  Creates a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 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 Details

  - ### ScriptResult

    public ScriptResult(Object javaScriptResult)
    Creates a new instance.
    Parameters:
      `javaScriptResult` - the object that was returned from the script engine

- ## Method Details

  - ### getJavaScriptResult

    public Object getJavaScriptResult()
    Returns the object that was the output of the script engine.
    Returns:
      the result from the script engine

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### isFalse

    public static boolean isFalse(ScriptResult scriptResult)
    Utility method testing if a script result is `false`.
    Parameters:
      `scriptResult` - a script result (may be `null`)
    Returns:
      `true` if `scriptResult` is `false`

  - ### 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 be `null`)
    Returns:
      `true` if `scriptResult` is undefined (there was no return value)