Working with JavaScript
Working with JavaScript
Last Updated | 27 February 2017 |
In this tutorial we'll see how to
- Interact with the DOM
- Use kotlinx.html to generate HTML
- Use ts2kt to interact with libraries
- Use dynamic to interact with libraries
Interacting with the DOM
The Kotlin standard library provides a series of wrappers around the JavaScript API for interacting with documents. The main component we'd usually access is the variable document
. Given we have access to this, we can simply read and write to the corresponding properties. For instance, to set the