Document

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

Passed in as doc to the buildPage lambda of the Kweb constructor.

Constructors

Link copied to clipboard
fun Document(receiver: WebBrowser)

Functions

Link copied to clipboard
open override fun addEventListener(eventName: String, returnEventFields: Set<String>, retrieveJs: String?, preventDefault: Boolean, callback: (JsonElement) -> Unit): Document
Link copied to clipboard
open override fun addImmediateEventCode(eventName: String, jsCode: String)
Link copied to clipboard
Link copied to clipboard
fun execCommand(command: String)
Link copied to clipboard
Link copied to clipboard
suspend fun getOrigin(): Any
Link copied to clipboard
Link copied to clipboard
fun on(retrieveJs: String? = null, preventDefault: Boolean = false): OnReceiver<Document>

You can supply a javascript expression retrieveJs which will be available via Event.retrieveJs

Properties

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

Allows data to be stored in and retrieved from the browser's local storage.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Allows data to be stored in and retrieved from the browser's session storage.