hellman
11/21/2019, 6:51 AMwindow
. That will throw a ReferenceError
, but since that isn’t exposed to the Kotlin/JS API, you have to catch Throwable
instead. Now you know if you’re running in the window or as a service workeranton.bannykh
11/21/2019, 8:57 AManton.bannykh
11/21/2019, 9:18 AM.js
file.
The only way to do that at the moment is to move the worker code to a separate module.hellman
11/21/2019, 10:42 AManton.bannykh
11/22/2019, 9:14 AM