public interface Script
This class encapsulates script execution relative to an object scope.
| Modifier and Type | Method and Description |
|---|---|
default Object |
exec(Context cx,
Scriptable scope)
Deprecated.
|
Object |
exec(Context cx,
Scriptable scope,
Scriptable thisObj)
Execute the script.
|
@Deprecated default Object exec(Context cx, Scriptable scope)
exec(Context, Scriptable, Scriptable)Object exec(Context cx, Scriptable scope, Scriptable thisObj)
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.
cx - the Context associated with the current threadscope - the scope to execute relative tothisObj - the value "this" should be set toContext.initStandardObjects()Copyright © 2025 HtmlUnit. All rights reserved.