kotlin.browser.Properties.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-stdlib Show documentation
Show all versions of kotlin-stdlib Show documentation
Kotlin Standard Library for JVM
package kotlin.browser
import org.w3c.dom.Document
private var _document: Document? = null
/**
* Provides access to the current active browsers DOM for the currently visible page.
*/
public var document: Document
get() {
// Note this code is only executed on the JVM
val answer = _document
return if (answer == null) {
kotlin.dom.createDocument()
} else answer
}
set(value) {
_document = value
}