diff options
author | Tobias Christiansen <tobyase@serenityos.org> | 2022-10-20 22:39:41 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-22 13:44:49 +0200 |
commit | be6bbdaa3b73e0517b206f7e3583f7bb03650839 (patch) | |
tree | 9f0368506100c62a161d75a2060925c5c34c3419 /Userland/Applications | |
parent | f1f6c4c0b6202b0ea8c2b05b04d69077ce3f7f83 (diff) | |
download | serenity-be6bbdaa3b73e0517b206f7e3583f7bb03650839.zip |
WebContent+Friends: Add get_element_tag_name IPC and plumbing
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/Browser/BrowserWindow.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/Browser/WebDriverEndpoints.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 1645ca51e4..41346b8728 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -606,6 +606,10 @@ void BrowserWindow::create_new_tab(URL url, bool activate) return active_tab().view().get_computed_value_for_element(element_id, property_name); }; + new_tab.webdriver_endpoints().on_get_element_tag_name = [this](i32 element_id) { + return active_tab().view().get_element_tag_name(element_id); + }; + new_tab.load(url); dbgln_if(SPAM_DEBUG, "Added new tab {:p}, loading {}", &new_tab, url); diff --git a/Userland/Applications/Browser/WebDriverEndpoints.h b/Userland/Applications/Browser/WebDriverEndpoints.h index 4af693b987..732304fb0e 100644 --- a/Userland/Applications/Browser/WebDriverEndpoints.h +++ b/Userland/Applications/Browser/WebDriverEndpoints.h @@ -23,6 +23,7 @@ public: Function<Optional<String>(i32 element_id, String const&)> on_get_element_property; Function<String()> on_get_active_documents_type; Function<String(i32 element_id, String const&)> on_get_computed_value_for_element; + Function<String(i32 element_id)> on_get_element_tag_name; }; } |