mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
WebContent+Friends: Add IPC and plumbing for WebDriver endpoint
To use the `GET /session/{id}/element/{id}/css/{property name}` WebDriver endpoint, two new IPC calls through the Browser are implemented: - get_active_documents_type returns the type of the active document, which is either "xml" or "html" - get_computed_value_for_element returns the computed CSS value (as String) for the given element and CSS property name
This commit is contained in:
parent
eda566d112
commit
202b2be1f2
Notes:
sideshowbarker
2024-07-17 05:16:24 +09:00
Author: https://github.com/TobyAsE
Commit: 202b2be1f2
Pull-request: https://github.com/SerenityOS/serenity/pull/15713
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/linusg
7 changed files with 70 additions and 0 deletions
|
@ -598,6 +598,14 @@ void BrowserWindow::create_new_tab(URL url, bool activate)
|
|||
return active_tab().view().get_element_property(element_id, name);
|
||||
};
|
||||
|
||||
new_tab.on_get_active_documents_type = [this]() {
|
||||
return active_tab().view().get_active_documents_type();
|
||||
};
|
||||
|
||||
new_tab.on_get_computed_value_for_element = [this](i32 element_id, String const& property_name) {
|
||||
return active_tab().view().get_computed_value_for_element(element_id, property_name);
|
||||
};
|
||||
|
||||
new_tab.load(url);
|
||||
|
||||
dbgln_if(SPAM_DEBUG, "Added new tab {:p}, loading {}", &new_tab, url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue