Let's walk through this concept of generating bindings to a third-party library to modify our web page using jQuery through our Kotlin code. To do this we're going to need to find TypeScript bindings for jQuery, convert those to Kotlin with ts2kt, and then use those bindings to manipulate our page from Kotlin.
By following these steps, we'll be able to add HTML elements to our web page programmatically from our Kotlin code:
- First, install the ts2kt tool using the following npm command: npm -g install ts2kt.
- Then, from the root directory of our project, install jQuery on your machine using npm install jquery. We'll need to test our project in our local development environment. This should result in a node_modules ...