mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 04:13:11 +00:00
Browser: Default page title to URL if no title is provided
This commit is contained in:
parent
aab022b77b
commit
e639c5bc25
|
@ -197,8 +197,13 @@ int main(int argc, char** argv)
|
|||
};
|
||||
|
||||
html_widget.on_title_change = [&](auto& title) {
|
||||
if (title.is_null()) {
|
||||
s_title = html_widget.main_frame().document()->url().to_string();
|
||||
}
|
||||
else {
|
||||
s_title = title;
|
||||
window->set_title(String::format("%s - Browser", title.characters()));
|
||||
}
|
||||
window->set_title(String::format("%s - Browser", s_title.characters()));
|
||||
};
|
||||
|
||||
auto focus_location_box_action = GUI::Action::create("Focus location box", { Mod_Ctrl, Key_L }, [&](auto&) {
|
||||
|
|
Loading…
Reference in a new issue