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

Function node_contains_matching_element

packages/server/src/main/batch.rs:737–748  ·  view source on GitHub ↗
(node: &Value, selector: &ElementSelector)

Source from the content-addressed store, hash-verified

735}
736
737fn node_contains_matching_element(node: &Value, selector: &ElementSelector) -> bool {
738 element_matches(node, selector)
739 || node
740 .get("children")
741 .and_then(Value::as_array)
742 .map(|children| {
743 children
744 .iter()
745 .any(|child| node_contains_matching_element(child, selector))
746 })
747 .unwrap_or(false)
748}
749
750fn parse_batch_sleep_duration_ms(
751 args: &StepOptions,

Callers 1

Calls 2

element_matchesFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected