Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Support fragment and query string in relative paths #19

Open
univac490 opened this issue Dec 3, 2020 · 1 comment
Open

Support fragment and query string in relative paths #19

univac490 opened this issue Dec 3, 2020 · 1 comment
Assignees
Labels

Comments

@univac490
Copy link

Setting HomePage="index.htm?x=1#xyz results in the app trying to load that file instead of interpreting it as a query string and a fragment. The workaround is to pass an absolute URL with a file scheme, but the app would have to reimplement the logic of creating an absolute path without access to the astilectron.Window.

Adding fragment and query options to astilectron.WindowOptions would fix the problem, but it could be argued that this is a bootstrap issue, since creating an absolute URL when you have access to astilectron.Window is fairly easy as demonstrated by absoluteResourcesPath in this project.

The other option is to add fragment and query to bootstrap.Options and create an absolute URL with a file scheme before creating the window.

@asticode asticode self-assigned this Dec 5, 2020
@asticode
Copy link
Owner

asticode commented Dec 5, 2020

@univac490 I understand the problem but I'm not quite understanding the solutions you describe.

Do you mean this line should be replaced by

url = "file:/" + filepath.Join(absoluteResourcesPath(a, relativeResourcesPath), "app", url)

?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants