Kotlin / kotlinx.html

Kotlin DSL for HTML
Apache License 2.0
1.6k stars 130 forks source link

Add wasmJs target support. #251

Closed IlyaGulya closed 7 months ago

IlyaGulya commented 7 months ago

Changes:

  1. Added wasmJs target support
  2. WasmJS target builds upon Element instead of HTMLElement because SVGElement does not inherit HTMLElement and class cast exception happens.
  3. Rewritten generators using KotlinPoet:
    • common: gen-consumer-tags.kt
    • js: gen-consumer-tags-js.kt
    • js: gen-event-attrs-js.kt
    • wasmJs: gen-consumer-tags-js.kt
    • wasmJs: gen-event-attrs-js.kt Now gen-consumer-tags.kt and gen-consumer-tags-js.kt are generated using single generator.
  4. Added tests for js and wasmJs which are checking that every generated tag is correctly instantiated in runtime.
  5. Upgraded kotlin to 1.9.22
  6. Upgraded gradle to 8.5
e5l commented 7 months ago

Hey @IlyaGulya, thanks for the PR. Could you rebase it on the latest master? the generated files has some conflicts

IlyaGulya commented 7 months ago

Sure

IlyaGulya commented 7 months ago

@e5l done!

IlyaGulya commented 7 months ago

Wow, that was fast 🙂