-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JSC. Add simple applications (#2449)
- Loading branch information
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
examples/js-common-playground/src/jsCommonMain/kotlin/web/events/Event.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package web.events | ||
|
||
open external class Event( | ||
type: String, | ||
) |
7 changes: 7 additions & 0 deletions
7
examples/js-common-playground/src/jsCommonMain/kotlin/web/messaging/MessageEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package web.messaging | ||
|
||
import web.events.Event | ||
|
||
open external class MessageEvent( | ||
type: String, | ||
): Event |
9 changes: 9 additions & 0 deletions
9
examples/js-common-playground/src/jsMain/kotlin/wrappers/example/Main.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package wrappers.example | ||
|
||
import web.events.Event | ||
import web.messaging.MessageEvent | ||
|
||
fun main() { | ||
val event: Any = MessageEvent("data") | ||
println(event is Event) | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/js-common-playground/src/wasmJsMain/kotlin/wrappers/example/Main.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package wrappers.example | ||
|
||
import web.events.Event | ||
import web.messaging.MessageEvent | ||
|
||
fun main() { | ||
val event: Any = MessageEvent("data") | ||
println(event is Event) | ||
} |