aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/WebViewStack.cpp
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-04-19 18:43:32 +0530
committerAkshay Nair <phenax5@gmail.com>2025-04-19 18:44:07 +0530
commita9d767b209c503ac7b5dff5132aa213d47dcb608 (patch)
tree6b5625c546ca24fd40e8d6f8306cc7b60713e4cc /src/widgets/WebViewStack.cpp
parent0e95e99e72237058465959d55b77750a9d7c1bef (diff)
downloadnull-browser-a9d767b209c503ac7b5dff5132aa213d47dcb608.tar.gz
null-browser-a9d767b209c503ac7b5dff5132aa213d47dcb608.zip
Add web.view.open_devtools for opening devtools
Diffstat (limited to '')
-rw-r--r--src/widgets/WebViewStack.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/WebViewStack.cpp b/src/widgets/WebViewStack.cpp
index 16fd3e9..9eef92a 100644
--- a/src/widgets/WebViewStack.cpp
+++ b/src/widgets/WebViewStack.cpp
@@ -199,6 +199,16 @@ void WebViewStack::focus_webview(WebViewId webview_id) {
layout->setCurrentIndex((int)webview_index);
}
+void WebViewStack::open_devtools(WebViewId webview_id) {
+ auto *webview = get_webview(webview_id);
+ if (webview == nullptr) {
+ qDebug() << "Webview does not exist";
+ return;
+ }
+
+ webview->open_devtools();
+}
+
void WebViewStack::set_search_text(const QString &text, WebViewId webview_id, bool forward) {
auto *webview = get_webview(webview_id);
if (webview == nullptr) {