Could I send an option with Element to js function? #3984
Unanswered
GISerliang
asked this question in
Q&A
Replies: 2 comments
-
This isn't currently supported natively, see #2645. You should be able to do this with |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks. I will try it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I had a js library and the constructor need seed an option with container, width and height. The container must be an HTMLElement. So I want to create a struct and send it as
JsValue
to js libbrary useRust
andwasm_bindgen
. But I got an errorthe trait `JsCast` is not implemented for `Options`
.Additional Details
The struct like this:
Beta Was this translation helpful? Give feedback.
All reactions