Skip to content
Discussion options

You must be logged in to vote

To just add an event listener on the window, use one of these helpers

If you need something more specific than that, you should drop into using wasm-bindgen's Closure type to wrap Rust code as a JS function, rather than creating a function from a JS string. See their docs here

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@caligin
Comment options

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