# Kotlin to JS Errors

**URL:** <https://discuss.kotlinlang.org/t/kotlin-to-js-errors/6368>\
**Category:** JavaScript\
**Created:** [January 25, 2018, 10:21am UTC](https://discuss.kotlinlang.org/t/kotlin-to-js-errors/6368 "2018-01-25T10:21:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomschrot](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/tomschrot/32/4346_2.png) [@tomschrot](https://discuss.kotlinlang.org/u/tomschrot)\
**Post date:** [January 25, 2018, 10:21am UTC](https://discuss.kotlinlang.org/t/kotlin-to-js-errors/6368/1 "2018-01-25T10:21:36Z")

</div>

Hi

Compiler produces Warning for:

Y:\KotlinPHP\kotlin\DOMEvent.kt:9:47: warning: the expression is unused  
infix fun watch(exec: DOMEvent.() → Unit) = exec()  
??

The JS code generated runs on Chrome,  
it does NOT run on MS Edge!? -produces

Unable to get property ‘DOMEvent’ of undefined or null reference

at runtime

---

<div class="post-metadata">

**Author:** ![Anton.Bannykh](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Anton.Bannykh](https://discuss.kotlinlang.org/u/Anton.Bannykh)\
**Post date:** [January 25, 2018, 11:47am UTC](https://discuss.kotlinlang.org/t/kotlin-to-js-errors/6368/2 "2018-01-25T11:47:41Z")

</div>

Could you give some more context? A self-contained example would be great.

We don’t have automated tests on Edge at the moment, so might be some incompatibility issue.

---

<div class="post-metadata">

**Author:** ![tomschrot](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/tomschrot/32/4346_2.png) [@tomschrot](https://discuss.kotlinlang.org/u/tomschrot)\
**Post date:** [January 25, 2018, 11:51am UTC](https://discuss.kotlinlang.org/t/kotlin-to-js-errors/6368/3 "2018-01-25T11:51:09Z")

</div>

Hi  
I can prepare an example for you.  
Email me …

---

<div class="post-metadata">

**Author:** ![Anton.Bannykh](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Anton.Bannykh](https://discuss.kotlinlang.org/u/Anton.Bannykh)\
**Post date:** [January 25, 2018, 12:10pm UTC](https://discuss.kotlinlang.org/t/kotlin-to-js-errors/6368/4 "2018-01-25T12:10:49Z")

</div>

Thanks! Here is my mail: [anton.bannykh@jetbrains.com](mailto:anton.bannykh@jetbrains.com)

---

<div class="post-metadata">

**Author:** ![tomschrot](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/tomschrot/32/4346_2.png) [@tomschrot](https://discuss.kotlinlang.org/u/tomschrot)\
**Post date:** [January 25, 2018, 12:14pm UTC](https://discuss.kotlinlang.org/t/kotlin-to-js-errors/6368/5 "2018-01-25T12:14:49Z")

</div>

Just tested on firefox 58.0 (64bit)  
app runs ok!

i’ll prepare the example…

---

<div class="post-metadata">

**Author:** ![Anton.Bannykh](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@Anton.Bannykh](https://discuss.kotlinlang.org/u/Anton.Bannykh)\
**Post date:** [February 12, 2018, 9:23am UTC](https://discuss.kotlinlang.org/t/kotlin-to-js-errors/6368/6 "2018-02-12T09:23:41Z")

</div>

For the record:

We had some discussion over the email, I tried to reproduce the issue and failed, despite having the same version of Chrome and IE. If just worked on my laptop. In the end we never found out what was the exact problem =(

---

<div class="post-metadata">

**Author:** ![tomschrot](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/tomschrot/32/4346_2.png) [@tomschrot](https://discuss.kotlinlang.org/u/tomschrot)\
**Post date:** [February 12, 2018, 10:52am UTC](https://discuss.kotlinlang.org/t/kotlin-to-js-errors/6368/7 "2018-02-12T10:52:47Z")

</div>

Hello Anton

Thank you for your effort and the reply!  
I think this is due to an following error that occurs on Edge’s JS engine  
while loading the Bootstrap stuff Im using in the project…  
Thus, it seems like a MS problem… 😉  
On Chrome and FF everything works fine!  
As soon as my friend brings her MacBook I’ll check Safari & let you know!  
If you really want to dig much deeper into this, let me know, I will  
prepare the complete package for you then.  
It requires a running LAMP stack on the machine…

cheers  
Tom
