Window

class Window(browser: WebBrowser) : EventGenerator<Window>

Represents the in-browser Document Object Model, corresponding to the JavaScript document object.

Passed in as window to the buildPage receiver of the Kweb constructor.

Constructors

Window
Link copied to clipboard
fun Window(browser: WebBrowser)

Functions

addEventListener
Link copied to clipboard
open override fun addEventListener(eventName: String, returnEventFields: Set<String>, retrieveJs: String?, preventDefault: Boolean, callback: (JsonElement) -> Unit): Window
addImmediateEventCode
Link copied to clipboard
open override fun addImmediateEventCode(eventName: String, jsCode: String)
on
Link copied to clipboard
fun on(retrieveJs: String? = null, preventDefault: Boolean = false): OnReceiver<Window>
You can supply a javascript expression retrieveJs which will be available via Event.retrieved

Properties

browser
Link copied to clipboard
open override val browser: WebBrowser
on
Link copied to clipboard
val on: OnReceiver<Window>
See here.
onImmediate
Link copied to clipboard
val onImmediate: OnImmediateReceiver<Window>
See here.