new

fun <ELEMENT_TYPE : Element, RETURN_VALUE_TYPE> ELEMENT_TYPE.new(position: Int? = null, receiver: ElementCreator<ELEMENT_TYPE>.() -> RETURN_VALUE_TYPE): RETURN_VALUE_TYPE

A convenience wrapper around new which allows a nested DSL-style syntax

Parameters

position

What position among the parent's children should the new element have?

receiver

A code block in which any created elements will be children of this element.