mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 19:37:34 +00:00
Browser: Support opening a URL from the command line at startup
This commit is contained in:
parent
c4da2a49a5
commit
15a016d3e3
1 changed files with 6 additions and 1 deletions
|
@ -94,7 +94,12 @@ int main(int argc, char** argv)
|
||||||
window->set_main_widget(widget);
|
window->set_main_widget(widget);
|
||||||
window->show();
|
window->show();
|
||||||
|
|
||||||
html_widget->load("file:///home/anon/www/welcome.html");
|
String url_to_load = "file:///home/anon/www/welcome.html";
|
||||||
|
|
||||||
|
if (app.args().size() >= 1)
|
||||||
|
url_to_load = app.args()[0];
|
||||||
|
|
||||||
|
html_widget->load(url_to_load);
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue