Hi everyone, I’m trying to load some javascript fr...
# javascript
f
Hi everyone, I’m trying to load some javascript from a file, and execute it in my kotlin code, this isn’t multiplatform, a standard android project where i simply want to execute some javascript. I am trying to import kotlin.js then use js(string) however I can’t import kotlin.js to my kotlin code I get “Packages cannot be imported”. I read the docs at https://kotlinlang.org/docs/js-interop.html, but can’t see what I am missing
c
This page is about calling JS from Kotlin code compiled to JavaScript. You cannot use it to call JS from Kotlin code compiled to Android.
f
I see so that is Kotlin transpiling to javascript, that would explain why the import doesn’t work, any idea on how to call javascript form kotlin targeting Android, or is this the wrong thread to be asking this on, cheers for your help
c
I think this is the wrong channel, but I don't know what the correct channel is. However, you may be interested in https://github.com/cashapp/zipline
f
Cool thanks, now that I know I was looking in the wrong place I should be able to work it out https://github.com/cashapp/zipline looks good and also https://github.com/LiquidPlayer/LiquidCore
👍 1