I am doing this technically in WasmJs target and I...
# getting-started
d
I am doing this technically in WasmJs target and I do not know enough about Kotlin/JS target, but can you add `.... { event: Event -> ...``
🧵 1
r
Yeah I do that, but then I get errors about
Event
being unreferenced
Unresolved reference: Event
I am not sure where it is expecitng me to import
I am doing the w3c.dom.*
and kotlinx.browser.window
kotlinx.browser.document
d
Can you make a test case in https://play.kotlinlang.org ?
r
d
import org.w3c.dom.events.Event
?
Kotlin/JS seems pedantic about that "options: dyamic" being specified, it should really allow it not to be
r
guess I was also mispelling the code
("load') { } versus of ("load", { }
d
Maybe you can write an extension function... I'd do something like this https://pl.kotl.in/YTO0nUtqf
It should probably be added to
EventTarget
type not Window 🙂
This is a better version on EventTarget https://pl.kotl.in/voLD4c1ad