diff options
author | Tobias Christiansen <tobyase@serenityos.org> | 2022-10-19 20:45:25 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-10-19 22:30:06 +0200 |
commit | 3db92885cd7e28a098e268f5f85faae1a139fe20 (patch) | |
tree | 2ebdf264585f777966e5e2cf040ad8cdc7a499b7 /Userland/Applications | |
parent | 6641c99c806afec9b9c58c13a05291b8b3241289 (diff) | |
download | serenity-3db92885cd7e28a098e268f5f85faae1a139fe20.zip |
WebContent+Friends: Add get_element_property IPC and plumbing
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/Browser/BrowserWindow.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/Browser/Tab.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index c6dd766936..3c9e851652 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -594,6 +594,10 @@ void BrowserWindow::create_new_tab(URL url, bool activate) return active_tab().view().get_element_attribute(element_id, name); }; + new_tab.on_get_element_property = [this](i32 element_id, String const& name) { + return active_tab().view().get_element_property(element_id, name); + }; + new_tab.load(url); dbgln_if(SPAM_DEBUG, "Added new tab {:p}, loading {}", &new_tab, url); diff --git a/Userland/Applications/Browser/Tab.h b/Userland/Applications/Browser/Tab.h index bc3d3f755c..38914b8644 100644 --- a/Userland/Applications/Browser/Tab.h +++ b/Userland/Applications/Browser/Tab.h @@ -71,6 +71,7 @@ public: Function<Optional<i32>()> on_get_document_element; Function<Optional<Vector<i32>>(i32 start_node_id, String const&)> on_query_selector_all; Function<Optional<String>(i32 element_id, String const&)> on_get_element_attribute; + Function<Optional<String>(i32 element_id, String const&)> on_get_element_property; enum class InspectorTarget { Document, |