-
Notifications
You must be signed in to change notification settings - Fork 152
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
[Feature request] Document.location and Window.location #1068
Comments
+1 for |
As written by @choumx in #8 (comment)
In order to support these features we'll need to hydrate the values from the main thread as well as keep it in sync as the Location is updated over time. Writing to the property would require creating a new command/processor for worker-->main-thread communication. This is a great FR, but unfortunately worker-dom isn't heavily staffed right now. |
For a PR to get through how much of the Location API would need to be built out? For example a read only version of the API, supporting only some the values? |
@NicholasKao1029: in general we implement features on a need basis, since each feature we add has a cost in terms of bundle size. A partial readonly API works for me. |
A readonly API to start works for me, so long as it is very clearly documented and has tests. |
I made the first draft of document.location support (PR #1075), but I don't know how to properly transfer the Location object between the main thread and worker, so it is not complete. But could @samouri or @kristoferbaxter have a look at this and maybe pick up the work? Thanks. |
@niutech could I work on your PR with you? |
@NicholasKao1029 Sure! That's what I was hoping for. You can pull my branch https://github.com/niutech/worker-dom/tree/location |
I see some work on this has begun, but I'd like to add my support to the original request. It would be very helpful in reconstructing the AMP CORS requirements for security on |
This may need an origin policy when trying to assign a new value to the location. |
any update? |
No, I have abandoned my work due to the lack of time. |
It would be nice to support the Document.location api to be able to use Vue-Router (or other js framework routers) in web workers
The text was updated successfully, but these errors were encountered: