Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPass the initial URL as an argument to Browser::new, not as a opts property #15636
Comments
|
I would like to work on this! |
|
I think the whole setup with |
|
@deror1869107 It's yours :) |
|
Could I replace |
I think so. Does the ServoUrl need to be an |
|
If url is |
|
Any reason to keep url in opts? |
|
@paulrouget we used the url in opts for browserhtml https://github.com/servo/servo/blob/master/resources/package-prefs.json#L5. This allows us to not need a script like the old |
|
@cbrewster We can read the pref in main() instead. So basically, I would suggest that we do:
Does it make sense? |
|
@paulrouget sounds good! |
|
#15699 was an attempt at fixing this; the work there had some review comments that needed to be addressed. |
|
@jdm I could take over this issue if no one else is working on it. |
|
Please do! |
|
@paulrouget do you want there to be a check if the |
Pass URL to Browser::new(), delegate url checking logic to 3rd party <!-- Please describe your changes on the following line: --> 1. Move the logic of computing the initial url from `opts.rs` to `/ports/servo/main.rs` 2. Add a `ServoUrl` argument to `Browser::new` Based on the requested changes by @paulrouget: >We can read the pref in main() instead. shell.homepage would be used if the url is not passed as an argument. I'm trying to decouple the "app" logic and the "web engine" logic. I think it's up to the app to set the initial URL, and I'm not sure the initial url should be part of opts. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #15636 <!-- Either: --> - [ ] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16477) <!-- Reviewable:end -->
This issue is part of an effort to improve Servo's embedding story. See https://github.com/paulrouget/servoshell/projects/2
Starting Servo from a third party application requires setting the initial URL as an option:
I would expect to be able to do that instead: