Hi everyone, I would like to use <the org.w3c.work...
# javascript
m
Hi everyone, I would like to use the org.w3c.workers.ServiceWorkerRegistration external class from Kotlin code but the pushManager property is not defined on Kotlin side. What is the recommended way to extend an existing external class with missing properties so that I don’t have to use dynamic? Thank you!
s
Not sure what is best but this works really well:
Copy code
val ServiceWorkerRegistration.pushManager: PushManager get() = this.asDynamic().pushManager
a
@turansky do we have some api for it inside the kotlin-wrappers?
t
In Kotlin Wrappers we have all stable browser API 😉
pushManager
property is here
m
oh that’s amazing, thank you. I have never seen this yet. 🙂 It might be worth mentioning somewhere in the docs. Or maybe I’m just blind