MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / runtime_get_properties

Function runtime_get_properties

packages/server/src/devtools.rs:1543–1563  ·  view source on GitHub ↗
(state: &mut CdpState, params: &Value)

Source from the content-addressed store, hash-verified

1541}
1542
1543fn runtime_get_properties(state: &mut CdpState, params: &Value) -> Value {
1544 let object_id = params
1545 .get("objectId")
1546 .and_then(Value::as_str)
1547 .unwrap_or_default();
1548 if let Some(node_id) = object_id
1549 .strip_prefix("node:")
1550 .and_then(|id| id.parse().ok())
1551 {
1552 return json!({
1553 "result": state.dom.node_properties(node_id),
1554 "internalProperties": [],
1555 "privateProperties": [],
1556 });
1557 }
1558 json!({
1559 "result": [],
1560 "internalProperties": [],
1561 "privateProperties": [],
1562 })
1563}
1564
1565fn exception_result(message: String) -> Value {
1566 json!({

Callers 1

handle_cdp_methodFunction · 0.85

Calls 2

getMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected