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, 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.