added the dom events API to the kotlin standard library and get it compiling as JS too (not unit tested yet mind you ;)
This commit is contained in:
@@ -38,12 +38,8 @@ native public trait Event {
|
||||
}
|
||||
}
|
||||
|
||||
native public trait EventListener {
|
||||
public fun handleEvent(arg1: Event): Unit = js.noImpl
|
||||
}
|
||||
|
||||
native public trait EventTarget {
|
||||
public fun dispatchEvent(arg1: Event): Boolean = js.noImpl
|
||||
public fun dispatchEvent(arg1: Event?): Boolean = js.noImpl
|
||||
public fun addEventListener(arg1: String?, arg2: EventListener, arg3: Boolean): Unit = js.noImpl
|
||||
public fun removeEventListener(arg1: String?, arg2: EventListener, arg3: Boolean): Unit = js.noImpl
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.w3c.dom.events
|
||||
|
||||
import org.w3c.dom.*
|
||||
import org.w3c.dom.views.*
|
||||
|
||||
/*
|
||||
TODO we should maybe update GeneratedJavaScriptStubs.kt to auto-create this file
|
||||
too so that we can have the implementation code generated for JS
|
||||
|
||||
See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||
*/
|
||||
|
||||
public trait EventListener {
|
||||
public fun handleEvent(arg1: Event?): Unit = js.noImpl
|
||||
}
|
||||
Reference in New Issue
Block a user