-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can't get window.location #1150
Comments
Try this https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Document.html#method.location (Sorry on mobile typing is a pain) |
This comment was marked as abuse.
This comment was marked as abuse.
I think this may have been a bug I've forgotten to publish actually, I just published new versions of all crates though! @dakom want to update and see if it's fixed now? |
This comment was marked as abuse.
This comment was marked as abuse.
Ah I can't get that to build unfortunately, do you have some steps though that could help me out? |
This comment was marked as abuse.
This comment was marked as abuse.
Oh if it's just a question of compiling (sorry, I thought it was runtime failing), then as mentioned in the documentation you'll need to enable a few features of the |
This comment was marked as abuse.
This comment was marked as abuse.
Either way's fine, I can do so here! |
Assuming a function to get the window as a Result, like this:
I can successfully get some other properties of the window, like inner_width:
But trying to get the
location
fails:In case it matters, the use case is something like this:
Not sure if this is related to #780 or #659
The text was updated successfully, but these errors were encountered: