Kotlin / kotlinx.html

Kotlin DSL for HTML
Apache License 2.0
1.63k stars 133 forks source link

Add contracts to generated code #211

Closed jschneider closed 5 months ago

jschneider commented 1 year ago

The block in this method is called exactly once: fun Node.append(block: TagConsumer<HTMLElement>.() -> Unit): List<HTMLElement>

It would be helpful to generate the contract{} for this method. This allowed assignments of created elements and simplifies the users code in some cases.