Scriptable

interface Scriptable

The interface every JavaScript object implements.

KMP: getDefaultValue takes a KClass rather than a java.lang.Class. The hint is only ever compared by identity against the sentinels on ScriptRuntime, so the mapping is exact (D-20).

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val className: String

The class name, as Object.prototype.toString reports it.

Link copied to clipboard
abstract var parentScope: Scriptable?
Link copied to clipboard
abstract var prototype: Scriptable?

Functions

Link copied to clipboard
abstract fun delete(index: Int)
abstract fun delete(name: String)
Link copied to clipboard
abstract fun get(index: Int, start: Scriptable): Any?

Gets an indexed property, or NOT_FOUND when there is none.

abstract fun get(name: String, start: Scriptable): Any?

Gets a named property, or NOT_FOUND when there is none.

Link copied to clipboard
abstract fun getDefaultValue(hint: KClass<*>?): Any?

Converts this object to a primitive, guided by hint.

Link copied to clipboard
abstract fun getIds(): Array<Any?>

Every property name of this object alone, ignoring the prototype chain.

Link copied to clipboard
abstract fun has(index: Int, start: Scriptable): Boolean
abstract fun has(name: String, start: Scriptable): Boolean
Link copied to clipboard
abstract fun hasInstance(instance: Scriptable): Boolean

Backs the instanceof operator.

Link copied to clipboard
abstract fun put(index: Int, start: Scriptable, value: Any?)
abstract fun put(name: String, start: Scriptable, value: Any?)