(state: &mut CdpState, params: &Value)
| 1541 | } |
| 1542 | |
| 1543 | fn 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 | |
| 1565 | fn exception_result(message: String) -> Value { |
| 1566 | json!({ |
no test coverage detected