kotlin-stdlib / kotlinx.dom / createElement createElement JS 1.4 fun Document.createElement( name: String, init: Element.() -> Unit): Element(source) Creates a new element with the specified name. The element is initialized with the specified init function.