Script

interface Script

Every compiled script implements this. It runs a script against an object scope.

The scope holds the global variables and functions the script can see. For a spec-compliant script that scope has to be a global object built by Context.initStandardObjects.

Inheritors

Functions

Link copied to clipboard
open fun exec(cx: Context, scope: Scriptable): Any?

Kept from upstream, where it exists for scripts compiled by an older release.

abstract fun exec(cx: Context, scope: Scriptable, thisObj: Scriptable): Any?

Runs the script with thisObj as its this value.