public class JSScript extends Object implements Script, ScriptOrFn<JSScript>
JSDescriptor. This class does not support the
Callable interface scripts do not support arguments or some other parts of a call
operation.| Constructor and Description |
|---|
JSScript(JSDescriptor<JSScript> descriptor,
Scriptable homeObject) |
| Modifier and Type | Method and Description |
|---|---|
Object |
exec(Context cx,
Scriptable scope,
Scriptable thisObj)
Execute the script.
|
JSDescriptor<JSScript> |
getDescriptor() |
Scriptable |
getHomeObject() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDeclarationScopepublic JSScript(JSDescriptor<JSScript> descriptor, Scriptable homeObject)
public JSDescriptor<JSScript> getDescriptor()
getDescriptor in interface ScriptgetDescriptor in interface ScriptOrFn<JSScript>public Scriptable getHomeObject()
getHomeObject in interface ScriptOrFn<JSScript>public Object exec(Context cx, Scriptable scope, Scriptable thisObj)
ScriptThe 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.
exec in interface Scriptcx - 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.