Ian
03/29/2017, 1:19 AMp().apply {
span().setText(”Hello”)
}
we use…
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.