Companion

object Companion

Properties

Link copied to clipboard
Link copied to clipboard
const val FEATURE_ASM_JS: Int = 23

Whether a function marked "use asm" is compiled to typed code. On by default. Turning it off makes such a function run like any other, which is the same answer, only slower.

Link copied to clipboard
const val FEATURE_DYNAMIC_SCOPE: Int = 7
Link copied to clipboard
const val FEATURE_E4X: Int = 6
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val FEATURE_INTL_402: Int = 22
Link copied to clipboard
const val FEATURE_LITTLE_ENDIAN: Int = 19
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val FEATURE_STRICT_EVAL: Int = 9
Link copied to clipboard
const val FEATURE_STRICT_MODE: Int = 11
Link copied to clipboard
const val FEATURE_STRICT_VARS: Int = 8
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val FEATURE_V8_EXTENSIONS: Int = 14
Link copied to clipboard
Link copied to clipboard

What Context.implementationVersion answers. Upstream reads it from a jar manifest.

Link copied to clipboard

Whether the code running right now is in strict mode. False when there is no context.

Link copied to clipboard
Link copied to clipboard

The value of undefined.

Link copied to clipboard
const val VERSION_1_0: Int = 100
Link copied to clipboard
const val VERSION_1_1: Int = 110
Link copied to clipboard
const val VERSION_1_2: Int = 120
Link copied to clipboard
const val VERSION_1_3: Int = 130
Link copied to clipboard
const val VERSION_1_4: Int = 140
Link copied to clipboard
const val VERSION_1_5: Int = 150
Link copied to clipboard
const val VERSION_1_6: Int = 160
Link copied to clipboard
const val VERSION_1_7: Int = 170
Link copied to clipboard
const val VERSION_1_8: Int = 180
Link copied to clipboard
const val VERSION_DEFAULT: Int = 0
Link copied to clipboard
const val VERSION_ECMASCRIPT: Int = 250

Like VERSION_ES6 with the remaining legacy leniencies switched off.

Link copied to clipboard
const val VERSION_ES6: Int = 200

The default: everything up to ES6 that this engine implements.

Link copied to clipboard
const val VERSION_UNKNOWN: Int

The version number a script asked for was not one of the known ones.

Functions

Link copied to clipboard
fun call(factory: ContextFactory?, callable: Callable, scope: Scriptable, thisObj: Scriptable?, args: Array<Any?>): Any?

Calls callable with a context entered, entering one from factory if needed.

Link copied to clipboard
Link copied to clipboard
fun enter(): Context

Enters a context from the global factory, or returns the one already entered.

Link copied to clipboard
fun exit()

Leaves the current context. Each enter needs one exit.

Link copied to clipboard

The entered context, or a failure if nothing entered one.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun reportError(message: String)

fun reportError(message: String, sourceName: String?, lineno: Int, lineSource: String?, lineOffset: Int)

Reports an error through the entered context's reporter, or throws when there is none.

Link copied to clipboard
fun reportRuntimeError(message: String, sourceName: String?, lineno: Int, lineSource: String?, lineOffset: Int): EvaluatorException
Link copied to clipboard
fun reportWarning(message: String)
fun reportWarning(message: String, sourceName: String?, lineno: Int, lineSource: String?, lineOffset: Int)
Link copied to clipboard

Rethrows e as something script can catch: a RhinoException as is, anything else wrapped.

Link copied to clipboard
fun toBoolean(value: Any?): Boolean
Link copied to clipboard
fun toNumber(value: Any?): Double
Link copied to clipboard
fun toObject(value: Any?, scope: Scriptable): Scriptable
Link copied to clipboard
fun toString(value: Any?): String