mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:27:35 +00:00
LibWebView+WebContent: Add APIs to manipulate DOM nodes
This adds APIs to allow Ispector clients to: * Change a DOM text or comment node's text data. * Add, replace, or remove a DOM element's attribute. * Change a DOM element's tag.
This commit is contained in:
parent
18a4455d43
commit
4cfeb41c4b
10 changed files with 138 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <LibWeb/CSS/PreferredColorScheme.h>
|
||||
#include <LibWeb/CSS/Selector.h>
|
||||
#include <LibWeb/WebDriver/ExecuteScript.h>
|
||||
#include <LibWebView/Attribute.h>
|
||||
|
||||
endpoint WebContentServer
|
||||
{
|
||||
|
@ -45,6 +46,10 @@ endpoint WebContentServer
|
|||
js_console_input(DeprecatedString js_source) =|
|
||||
js_console_request_messages(i32 start_index) =|
|
||||
|
||||
set_dom_node_text(i32 node_id, String text) =|
|
||||
set_dom_node_tag(i32 node_id, String name) => (Optional<i32> node_id)
|
||||
replace_dom_node_attribute(i32 node_id, String name, Vector<WebView::Attribute> replacement_attributes) =|
|
||||
|
||||
take_document_screenshot() => (Gfx::ShareableBitmap data)
|
||||
|
||||
run_javascript(DeprecatedString js_source) =|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue