You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
When trying to create a worker agent on a document location that has a non empty query string, the query string is included in the resource URL of the worker. This leads to a resource URL that cannot be found.
Steps To Reproduce
Go to a page that spawns a worker
Add some query string and reload the page
Worker resource URL cannot be found
Expected behavior
Query string is not included in the worker's resource URL.
Screenshots
Error in console with query string ?homescreen:
Environment:
Yew version [master]
Questionnaire
I'm interested in fixing this myself but don't know where to start
I would like to fix and I have a solution
I don't have time to fix this right now, but maybe later
let href = utils::document().location().unwrap().href().unwrap();
The href should be replaced with either:
page origin
or
page origin + pathname
While page origin + pathname is closer to the way it behaves currently, I think the correct solution, however, is to only use the page origin. This way the resource URL is independent of the current path. But I am happy to implement either one: maintainer's choice!
The text was updated successfully, but these errors were encountered:
Problem
When trying to create a worker agent on a document location that has a non empty query string, the query string is included in the resource URL of the worker. This leads to a resource URL that cannot be found.
Steps To Reproduce
Expected behavior
Query string is not included in the worker's resource URL.
Screenshots

Error in console with query string
?homescreen
:Environment:
master
]Questionnaire
The issue is in
yew/yew/src/agent.rs
Line 1017 in af5bbf8
The
href
should be replaced with either:or
While page origin + pathname is closer to the way it behaves currently, I think the correct solution, however, is to only use the page origin. This way the resource URL is independent of the current path. But I am happy to implement either one: maintainer's choice!
The text was updated successfully, but these errors were encountered: