kotlinx.html
kotlinx.html copied to clipboard
Provides a short access to document elements by ID via delegated
trafficstars
property syntax. Received element is not cached and received directly from the [Document] by calling [Document.getElementById] function on every property access. Throws an exception if element is not found or has different type To access an element with theId ID use the following property declaration
val theID by document.gettingElementById
To access an element of specific type, just add it to the property declaration
val theID : HTMLImageElement by document.gettingElementById
see for more details: https://youtrack.jetbrains.com/issue/KT-32552
Also reported in https://github.com/JetBrains/kotlin/pull/2458