mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
Inspector: Make properties editable :^)
This patch makes it possible to live-edit remote object properties by simply double clicking on them in the property table view. This is pretty neat! :^)
This commit is contained in:
parent
3edcaa9b99
commit
b2be8466fb
Notes:
sideshowbarker
2024-07-19 08:53:48 +09:00
Author: https://github.com/awesomekling
Commit: b2be8466fb
5 changed files with 39 additions and 0 deletions
|
@ -31,11 +31,19 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
RemoteProcess* s_the;
|
||||
|
||||
RemoteProcess& RemoteProcess::the()
|
||||
{
|
||||
return *s_the;
|
||||
}
|
||||
|
||||
RemoteProcess::RemoteProcess(pid_t pid)
|
||||
: m_pid(pid)
|
||||
, m_object_graph_model(RemoteObjectGraphModel::create(*this))
|
||||
, m_socket(Core::LocalSocket::construct())
|
||||
{
|
||||
s_the = this;
|
||||
}
|
||||
|
||||
void RemoteProcess::handle_identify_response(const JsonObject& response)
|
||||
|
@ -104,6 +112,16 @@ void RemoteProcess::set_inspected_object(uintptr_t address)
|
|||
send_request(request);
|
||||
}
|
||||
|
||||
void RemoteProcess::set_property(uintptr_t object, const StringView& name, const JsonValue& value)
|
||||
{
|
||||
JsonObject request;
|
||||
request.set("type", "SetProperty");
|
||||
request.set("address", object);
|
||||
request.set("name", JsonValue(name));
|
||||
request.set("value", value);
|
||||
send_request(request);
|
||||
}
|
||||
|
||||
void RemoteProcess::update()
|
||||
{
|
||||
m_socket->on_connected = [this] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue