currently my production code crashes on safari wit...
# javascript
g
currently my production code crashes on safari with an error:
Can't find variable: PushManager
, since safari does not support PushManager API. I've declared an
external class PushManager
with required methods in my kotlin.js app. Inside the compiled .js bundle there is a variable assignment to a PushManager class (like a typealias), and that is the reason of the error on safari. Is there a way I could prevent this?
t
Is there
PushManager
polyfill?
g
No. Since Safari only supports PushManager interface, but not the actual js object implementation,
external interface PushManager
did the trick.