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

Function controlInfo

packages/nativescript-inspector/src/index.ts:2145–2156  ·  view source on GitHub ↗
(view: any)

Source from the content-addressed store, hash-verified

2143}
2144
2145function controlInfo(view: any): JSONObject | null {
2146 if (!isKindOf(view, "UIControl")) {
2147 return null;
2148 }
2149 return {
2150 controlState: numberValue(read(view, "state")),
2151 controlEvents: numberValue(read(view, "allControlEvents")),
2152 isSelected: Boolean(read(view, "selected")),
2153 isHighlighted: Boolean(read(view, "highlighted")),
2154 actions: actionsFor(view),
2155 };
2156}
2157
2158function actionsFor(target: any): string[] {
2159 const native = nativeTarget(target);

Callers 3

nativeScriptNodeMethod · 0.85
uikitNodeMethod · 0.85

Calls 4

isKindOfFunction · 0.85
numberValueFunction · 0.85
readFunction · 0.85
actionsForFunction · 0.85

Tested by

no test coverage detected