W3cubDocs

/Kotlin

createElement

Platform and version requirements: JS (1.4)
fun Document.createElement(
    name: String, 
    init: Element.() -> Unit
): Element

Creates a new element with the specified name.

The element is initialized with the specified init function.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.dom/create-element.html