Hello, I'm implementing WebAuthn, which requires t...
# javascript
d
Hello, I'm implementing WebAuthn, which requires the JavaScript
CredentialsContainer
available at
window.navigator.credentials
, but the Kotlin browser API doesn't expose it yet: https://kotlinlang.org/api/latest/jvm/stdlib/org.w3c.dom/-navigator/ Are there any plans to update the Kotlin/JS standard library to expose the JavaScript credentials API? https://developer.mozilla.org/en-US/docs/Web/API/Navigator/credentials
t
You can use modern
kotlin-browser
with updated Navigator
Please file an issue in
kotlin-wrappers
and I will add missed types
Strict types expected in next release
d
Thanks!
t
Released in
pre.563
Works? 🙂
d
Hey @turansky, there are a few more missing types: https://github.com/JetBrains/kotlin-wrappers/issues/2038
On another note, the types are all generated as
sealed
, which is difficult to work with. I need to use
unsafeCast
because I can't instantiate the objects. Not sure if there's another way?
t
For sealed interfaces you need to use
jso
builder
❤️ 1
unsafeCast
not required at all
d
Awesome. Thanks!
Working in
pre.567
👍
t
:)