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

WebContent+Friends: Add get_element_attribute IPC and plumbing

This commit is contained in:
Tobias Christiansen 2022-10-19 16:56:08 +02:00 committed by Linus Groh
parent dfc3a4772b
commit 3f5a620b5d
7 changed files with 30 additions and 0 deletions

View file

@ -590,6 +590,10 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
return active_tab().view().query_selector_all(start_node_id, selector);
};
new_tab.on_get_element_attribute = [this](i32 element_id, String const& name) {
return active_tab().view().get_element_attribute(element_id, name);
};
new_tab.load(url);
dbgln_if(SPAM_DEBUG, "Added new tab {:p}, loading {}", &new_tab, url);