kvision / pl.treksoft.kvision.electron / WebFrame

WebFrame

external interface WebFrame : EventEmitter

Functions

clearCache

abstract fun clearCache(): Unit

executeJavaScript

abstract fun executeJavaScript(code: String, userGesture: Boolean? = definedExternally, callback: ((result: Any) -> Unit)? = definedExternally): Promise<Any>

executeJavaScriptInIsolatedWorld

abstract fun executeJavaScriptInIsolatedWorld(worldId: Number, scripts: Array<WebSource>, userGesture: Boolean? = definedExternally, callback: ((result: Any) -> Unit)? = definedExternally): Unit

getResourceUsage

abstract fun getResourceUsage(): ResourceUsage

getZoomFactor

abstract fun getZoomFactor(): Number

getZoomLevel

abstract fun getZoomLevel(): Number

insertText

abstract fun insertText(text: String): Unit

registerURLSchemeAsBypassingCSP

abstract fun registerURLSchemeAsBypassingCSP(scheme: String): Unit

registerURLSchemeAsPrivileged

abstract fun registerURLSchemeAsPrivileged(scheme: String, options: RegisterURLSchemeAsPrivilegedOptions? = definedExternally): Unit

registerURLSchemeAsSecure

abstract fun registerURLSchemeAsSecure(scheme: String): Unit

setIsolatedWorldContentSecurityPolicy

abstract fun setIsolatedWorldContentSecurityPolicy(worldId: Number, csp: String): Unit

setIsolatedWorldHumanReadableName

abstract fun setIsolatedWorldHumanReadableName(worldId: Number, name: String): Unit

setIsolatedWorldSecurityOrigin

abstract fun setIsolatedWorldSecurityOrigin(worldId: Number, securityOrigin: String): Unit

setLayoutZoomLevelLimits

abstract fun setLayoutZoomLevelLimits(minimumLevel: Number, maximumLevel: Number): Unit

setSpellCheckProvider

abstract fun setSpellCheckProvider(language: String, autoCorrectWord: Boolean, provider: Provider): Unit

setVisualZoomLevelLimits

abstract fun setVisualZoomLevelLimits(minimumLevel: Number, maximumLevel: Number): Unit

setZoomFactor

abstract fun setZoomFactor(factor: Number): Unit

setZoomLevel

abstract fun setZoomLevel(level: Number): Unit

Inherited Functions

addListener

open fun addListener(event: String, listener: Function<*>): EventEmitter

emit

open fun emit(event: String, vararg args: Any): Boolean

eventNames

open fun eventNames(): Array<String>

getMaxListeners

open fun getMaxListeners(): Number

listenerCount

open fun listenerCount(type: String): Number

listeners

open fun listeners(event: String): Array<Function<*>>

on

open fun on(event: String, listener: Function<*>): EventEmitter

once

open fun once(event: String, listener: Function<*>): EventEmitter

prependListener

open fun prependListener(event: String, listener: Function<*>): EventEmitter

prependOnceListener

open fun prependOnceListener(event: String, listener: Function<*>): EventEmitter

removeAllListeners

open fun removeAllListeners(event: String? = definedExternally): EventEmitter

removeListener

open fun removeListener(event: String, listener: Function<*>): EventEmitter

setMaxListeners

open fun setMaxListeners(n: Number): EventEmitter

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.