KiteJsScriptEngine

class KiteJsScriptEngine(val instructionBudget: Int = DEFAULT_INSTRUCTION_BUDGET, deadline: () -> Boolean? = null, clock: () -> Long? = null, asmJs: Boolean = true) : KiteScriptEngine

A KiteScriptEngine that runs on KiteJS.

Document scripts are untrusted, so every call runs under instructionBudget: a script that never returns fails with a KiteScriptException instead of hanging the app. The built-ins are read-only, so one script cannot redefine what another relies on. Scripts reach nothing outside the engine except the functions and values the host defines.

Constructors

Link copied to clipboard
constructor(instructionBudget: Int = DEFAULT_INSTRUCTION_BUDGET, deadline: () -> Boolean? = null, clock: () -> Long? = null, asmJs: Boolean = true)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

What the engine did with each "use asm" function it has parsed, one line each.

Link copied to clipboard

Interpreter steps one call may take before it stops. 0 means no limit.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun defineFunction(name: String, function: (List<Any?>) -> Any?)
Link copied to clipboard
open override fun defineValue(name: String, value: Any?)
Link copied to clipboard
open override fun evaluate(source: String, name: String): String?