mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:47:35 +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
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