Hi
in HTML I use
<button id="_bt1" type="button" onclick="kt.MyClass.Event.invoke(this)">
for signaling GUI events to Kotlin-JS. That will work for a class like
class MyEvent{
@JsName("invoke")
fun invoke(obj: dynamic) {}
}
class MyClass{
object Event: MyEvent()
}
but moving Event to an e.g. abstract class like
abstract class Control{
object Event: MyEvent()
}
class OtherClass: Control {
}
the JS runtime crashes with
Uncaught TypeError: Cannot read property ‘invoke’ of undefined
_ at HTMLButtonElement.onclick_
How can I solve this?