-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
How to access data descriptor properties of a JS class instance? #2588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe both this syntax and |
@alexcrichton The first syntax only works (at least in my testing) if |
You may need to add |
Ah, thanks! I had added |
Seems reasonable to me! |
Uh oh!
There was an error while loading. Please reload this page.
Summary
With
wasm-bindgen
it is easy to get properties of classes accessed by getters. For example,allows using the getter for property
bar
ofFoo
from Rust.But what if the object property is a simple data descriptor, as opposed to having getter or setter methods? How can one access the property from Rust then (other than with
Reflect
)? I've searched the docs but haven't found anything.The text was updated successfully, but these errors were encountered: