JsObject
A JavaScript object seen from Kotlin. Reading and writing goes straight through to the engine, so a change here is a change the script sees.
Inheritors
Properties
Functions
Link copied to clipboard
fun JsObject.constructor(name: String, arity: Int = 0, flags: PropertyFlags = PropertyFlags(enumerable = false), build: (JsObject, List<JsValue>) -> Unit): JsFunction
A host constructor, callable with new. build fills in the object it is given.
Link copied to clipboard
A one-argument host function, with the argument and the answer converted for you.
A two-argument host function.
inline fun <A, B, C, R> JsObject.function(name: String, crossinline body: (A, B, C) -> R): JsFunction
A three-argument host function.
fun JsObject.function(name: String, arity: Int = 0, flags: PropertyFlags = PropertyFlags(enumerable = false), body: (List<JsValue>) -> Any?): JsFunction
A host function that takes the arguments as they came.