1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:27:35 +00:00

WebContent+Friends: Add get_element_property IPC and plumbing

This commit is contained in:
Tobias Christiansen 2022-10-19 20:45:25 +02:00 committed by Linus Groh
parent 6641c99c80
commit 3db92885cd
7 changed files with 40 additions and 0 deletions

View file

@ -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);

View file

@ -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,