Kotlin / kotlinx.html

Kotlin DSL for HTML
Apache License 2.0
1.61k stars 131 forks source link

Add Kotlin/Wasm support #210

Closed sdeleuze closed 7 months ago

sdeleuze commented 1 year ago

I would need Kotlin/Wasm support for this library, I have various related use cases in https://github.com/sdeleuze/kowasm, see https://seb.deleuze.fr/the-huge-potential-of-kotlin-wasm/ for more context.

sdeleuze commented 1 year ago

I have created a WASM version in https://github.com/sdeleuze/kowasm/tree/main/kotlinx-html-wasm for now until Kotlin/Wasm support reaches upstream.

It is super close to Kotlin/JS support so common code could maybe be shared using hierarchical project structure.

I had to change asDynamic()[name] = callback to addEventListener(name.substring(2), callback as (org.w3c.dom.events.Event) -> Unit) in dom-js.kt, I have made @skuzmich aware there may be something to fix there.

SPC-code commented 9 months ago

This one is a blocker for some of our projects. Please release a version with Wasm support for 1.9.20.

e5l commented 7 months ago

Released in 0.11.0

bashor commented 7 months ago

@e5l it looks like it's not published properly to maven central. 404 on https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-html-wasm-js/.

e5l commented 7 months ago

Hey @bashor, thanks for the notice. I've found and fixed the publication issue. The files have already been published and will be available shortly!