https://kotlinlang.org logo
#kweb
Title
i

Ian

03/16/2017, 5:47 PM
This approach works well for DSLs, you can type:
Copy code
doc.body.apply {
  h1().setText(”Hello”)
  p().setText(”A paragraph”)
}
And this will be mirrored in the DOM, a <h1> followed by a <p>, both added as children of <body>.