summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-10-07 13:35:40 +0200
committerAndrew Kaster <andrewdkaster@gmail.com>2022-12-25 07:58:58 -0700
commit0a8c86a9d98dde497bd8b6477a7202b375bdfcf3 (patch)
tree0d6fd2eff5b870e9275fe9c63fdd48616931db54
parente9135583bdea7fc5f3afdd9354c308068d51a399 (diff)
downloadserenity-0a8c86a9d98dde497bd8b6477a7202b375bdfcf3.zip
Ladybird: Load about:blank in new tabs
This makes the JS console usable in new tabs, without having to load something first.
-rw-r--r--Ladybird/Tab.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Ladybird/Tab.cpp b/Ladybird/Tab.cpp
index f19ac4941b..9982099b9d 100644
--- a/Ladybird/Tab.cpp
+++ b/Ladybird/Tab.cpp
@@ -97,6 +97,10 @@ Tab::Tab(BrowserWindow* window)
text_edit->setPlainText(source);
text_edit->show();
});
+
+ // FIXME: This is a hack to make the JS console usable in new windows.
+ // Something else should ensure that there's an initial about:blank document loaded in the view.
+ m_view->load("about:blank"sv);
}
void Tab::focus_location_editor()