← Docs
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.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .