mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 08:35:09 +00:00
LibCore: Add a way to set an individual Core::Object property remotely
This commit is contained in:
parent
ca110a6e54
commit
42f2696355
3 changed files with 27 additions and 0 deletions
|
@ -173,6 +173,15 @@ void Object::save_to(JsonObject& json)
|
|||
json.set("parent", (uintptr_t)parent());
|
||||
}
|
||||
|
||||
bool Object::set_property(const StringView& name, const JsonValue& value)
|
||||
{
|
||||
if (name == "name") {
|
||||
set_name(value.to_string());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Object::is_ancestor_of(const Object& other) const
|
||||
{
|
||||
if (&other == this)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue