Skip to content

How to call navigator.credentials.get/create from Yew #1699

Answered by teymour-aldridge
Firstyear asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!
Yew needs to sit on top of a set of bindings to in-browser Javascript APIs. Currently, there are two options – web-sys and stdweb (but support for stdweb is being deprecated because stdweb is no longer actively maintained).
To call Javascript functions you should use web-sys (a set of bindings to Javascript API's maintained by the rust-wasm working group). For navigator.credentials.get for example you would roughly want:

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Firstyear
Comment options

@teymour-aldridge
Comment options

@Firstyear
Comment options

@Firstyear
Comment options

Answer selected by Firstyear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants