# Kotlinx html append native node

**URL:** <https://discuss.kotlinlang.org/t/kotlinx-html-append-native-node/7994>\
**Category:** Libraries\
**Created:** [June 2, 2018, 2:22pm UTC](https://discuss.kotlinlang.org/t/kotlinx-html-append-native-node/7994 "2018-06-02T14:22:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinom](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@martinom](https://discuss.kotlinlang.org/u/martinom)\
**Post date:** [June 2, 2018, 2:22pm UTC](https://discuss.kotlinlang.org/t/kotlinx-html-append-native-node/7994/1 "2018-06-02T14:22:39Z")

</div>

I’m using kotlinx html builders with Kotlin-JS. I’d like to append a native DOM-Node while inside a kotlinx builder. Is it possible?

```
document.create.div {
            val elem: HTMLElement = someFun()
            // append is not defined. How can I do this?
            append(elem)
}

```

---

<div class="post-metadata">

**Author:** ![anpham6](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/anpham6/32/7567_2.png) [@anpham6](https://discuss.kotlinlang.org/u/anpham6)\
**Post date:** [June 6, 2018, 5:01am UTC](https://discuss.kotlinlang.org/t/kotlinx-html-append-native-node/7994/2 "2018-06-06T05:01:50Z")

</div>

append is a jQuery method. The native DOM method is called appendChild.

---

<div class="post-metadata">

**Author:** ![martinom](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@martinom](https://discuss.kotlinlang.org/u/martinom)\
**Post date:** [June 25, 2018, 5:56am UTC](https://discuss.kotlinlang.org/t/kotlinx-html-append-native-node/7994/3 "2018-06-25T05:56:43Z")

</div>

Yes. But appendChild is not available as well. The problem is, the div is not instantiated yet. Any ideas?
