Window

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

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

Link copied to clipboard
constructor(browser: WebBrowser)

Properties

Link copied to clipboard
open override val browser: WebBrowser
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun addEventListener(eventName: String, returnEventFields: Set<String>, retrieveJs: String?, preventDefault: Boolean, callback: (JsonElement) -> Unit): Window
Link copied to clipboard
open override fun addImmediateEventCode(eventName: String, jsCode: String)
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