Script (rhino 1.7.7.2 API)
Date: 2017-09-27

org.mozilla.javascript

## Interface Script

-     public interface Script

  All compiled scripts implement this interface.

  This class encapsulates script execution relative to an object scope.

  Since:
    1.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `exec(Context cx, Scriptable scope)` Execute the script.

- - ### Method Detail

    - #### exec

          java.lang.Object exec(Context cx,
                                Scriptable scope)

      Execute the script.

      The script is executed in a particular runtime Context, which must be associated with the current thread. The script is executed relative to a scope--definitions and uses of global top-level variables and functions will access properties of the scope object. For compliant ECMA programs, the scope must be an object that has been initialized as a global object using `Context.initStandardObjects`.

      Parameters:
        `cx` - the Context associated with the current thread
        `scope` - the scope to execute relative to
      Returns:
        the result of executing the script
      See Also:
        `Context.initStandardObjects()`