@here can we manipulate the dom like setting inner...
# kotlin-native
a
@here can we manipulate the dom like setting innerHtml for wasm32 target ? I saw the canvas example, I am trying to manipulate the dom, any pointers/help would be greatly appreciated.
n
Right now there isn't a way to access Web/JS APIs in Kotlin Native. For the time being if you want API access then you need to use Kotlin JS instead.
Would be very nice to have API access, for example I have a Kotlin JS library (https://github.com/webscene/webscene-client) I want to port over to Kotlin Native. If the API access existed then the Kotlin Native ecosystem could get a bit of a boost with a lot of Kotlin JS libraries/frameworks being ported over. 😃
a
Oh😞
Thanks a lot Nick for the info. 😀
o
DOM access currently needs additional effort on developer’s side, namely to generate bridges to DOM APIs, similar to what was done for canvas access in the example. There’s ongoing effort for stub generation in https://github.com/JetBrains/kotlin-native/compare/js_double, which shows how to add more functionality in bridges.
a
Thanks a lot Nikolay, I will take a look