This is a fairly major refactor of the API, so you...
# kweb
i
This is a fairly major refactor of the API, so your code will break. The main change is that instead of:
Copy code
p().apply {
    span().setText(”Hello”)
  }
we use…
Copy code
p().new {
    span().text(”Hello”)
  }
In case you missed it, children of an element are created in a
new {…}
block, making it clear that you’re creating elements, not modifying them.
span().text(”Hello")
is an example of modifying an element rather than creating a child of it.