1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

Ladybird: Add quick & dirty port of the JS console from Browser :^)

This commit is contained in:
Andreas Kling 2022-07-17 14:47:26 +02:00 committed by Andrew Kaster
parent af5250b2cb
commit aa5f886128
6 changed files with 437 additions and 1 deletions

View file

@ -52,6 +52,16 @@ BrowserWindow::BrowserWindow(Core::EventLoop& event_loop)
}
});
auto* js_console_action = new QAction("Show &JS Console");
js_console_action->setIcon(QIcon(QString("%1/res/icons/16x16/filetype-javascript.png").arg(s_serenity_resource_root.characters())));
js_console_action->setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_J));
inspect_menu->addAction(js_console_action);
QObject::connect(js_console_action, &QAction::triggered, this, [this] {
if (m_current_tab) {
m_current_tab->view().show_js_console();
}
});
auto* debug_menu = menuBar()->addMenu("&Debug");
auto* dump_dom_tree_action = new QAction("Dump DOM Tree");