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

Function is_actionable_element

packages/server/src/main/tap_target.rs:182–192  ·  view source on GitHub ↗
(node: &Value)

Source from the content-addressed store, hash-verified

180}
181
182fn is_actionable_element(node: &Value) -> bool {
183 let haystack = format!(
184 "{} {}",
185 string_field(node, "type").unwrap_or_default(),
186 string_field(node, "role").unwrap_or_default()
187 )
188 .to_lowercase();
189 ["button", "textfield", "switch", "link", "cell"]
190 .iter()
191 .any(|needle| haystack.contains(needle))
192}

Callers 1

find_element_tap_targetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected