Robert Jaros
11/02/2022, 3:26 PMexternal interface Window
with alert()
method, external val window : Window
and I've got window.alert()
working. How does it talk to the browser API?? Is it documented somewhere what is possible (what should be possible)?ESchouten
11/02/2022, 3:41 PMjessel
11/02/2022, 3:57 PMexternal
statementsRobert Jaros
11/02/2022, 4:16 PMRobert Jaros
11/02/2022, 4:27 PM{}
on JS side.Robert Jaros
11/02/2022, 4:30 PMSvyatoslav Kuzmich [JB]
11/02/2022, 4:50 PMexternal
s work for the most part similar to K/JS. You cannot inherit or implement them. Design is not finished and we don’t have docs yet, but you can look at working examples at https://github.com/JetBrains/kotlin/tree/03c352c11e1ed0ca28653937c5f944883c5376b0/compiler/testData/codegen/boxWasmJsInteropSvyatoslav Kuzmich [JB]
11/02/2022, 4:52 PMexternref
Wasm types. Compiler generates needed function imports from JS.Svyatoslav Kuzmich [JB]
11/02/2022, 4:54 PMHow can I expose kotlin code (e.g. some data class or function) to JS?You cannot at the moment. You can
@JsExport
top-level functions and use K/Wasm references as opaque objects.Robert Jaros
11/02/2022, 5:11 PMdynamic
be available in Kotlin/Wasm?Svyatoslav Kuzmich [JB]
11/02/2022, 5:40 PMdynamic
Svyatoslav Kuzmich [JB]
11/02/2022, 5:50 PM