# Usage of "globalThis" in the TouchEvent class from web.uievents namespace

**URL:** <https://discuss.kotlinlang.org/t/usage-of-globalthis-in-the-touchevent-class-from-web-uievents-namespace/28414>\
**Category:** JavaScript\
**Created:** [April 5, 2024, 1:05pm UTC](https://discuss.kotlinlang.org/t/usage-of-globalthis-in-the-touchevent-class-from-web-uievents-namespace/28414 "2024-04-05T13:05:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boubalou](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/boubalou/32/10831_2.png) [@Boubalou](https://discuss.kotlinlang.org/u/Boubalou)\
**Post date:** [April 5, 2024, 1:05pm UTC](https://discuss.kotlinlang.org/t/usage-of-globalthis-in-the-touchevent-class-from-web-uievents-namespace/28414/1 "2024-04-05T13:05:55Z")

</div>

Hey all!

We had to support older TV devices such as Samsung TV on Chrome 63 and stumbled on an error while using Kotlin JS and the `TouchEvent` class from the `web.uievents` namespace.

As we can see [here](https://github.com/JetBrains/kotlin-wrappers/commit/d13e018849fb8a1eacf8548480ddcc7c1e79af2a), it uses **globalThis** as a JS Qualifier, which enforce us to either not use this `TouchEvent` class or fallback on the usage of a Polyfill.

For our use case, we were good using the `TouchEvent` class in the `react.dom.events` namespace, but for the sake of understanding why is it this way, I came here to shed some light on this.

So, why is this class the only one in the whole project to use **globalThis** as the accessor of the class?

P.S.: Attached screenshot of the generated JS code when using the class.

 ![Screenshot 2024-04-05 at 9.04.12 AM](https://us1.discourse-cdn.com/flex019/uploads/kotlinlang/original/2X/0/01bff58ec459356b686cec8290df9ccca0ae6209.png)
