mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:57: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
29
Userland/Libraries/LibWebView/Attribute.h
Normal file
29
Userland/Libraries/LibWebView/Attribute.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <LibIPC/Forward.h>
|
||||
|
||||
namespace WebView {
|
||||
|
||||
struct Attribute {
|
||||
String name;
|
||||
String value;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace IPC {
|
||||
|
||||
template<>
|
||||
ErrorOr<void> encode(Encoder&, WebView::Attribute const&);
|
||||
|
||||
template<>
|
||||
ErrorOr<WebView::Attribute> decode(Decoder&);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue