MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / isEventOrGesture

Function isEventOrGesture

packages/core/ui/core/bindable/index.ts:82–91  ·  view source on GitHub ↗
(name: string, view: ViewBase)

Source from the content-addressed store, hash-verified

80// TODO: Make this instance function so that we dont need public static tapEvent = "tap"
81// in controls. They will just override this one and provide their own event support.
82export function isEventOrGesture(name: string, view: ViewBase): boolean {
83 if (typeof name === 'string') {
84 const eventOrGestureName = getEventOrGestureName(name);
85 const evt = `${eventOrGestureName}Event`;
86
87 return (view.constructor && evt in view.constructor) || isGesture(eventOrGestureName);
88 }
89
90 return false;
91}
92
93export class Binding {
94 private source: WeakRef<Object>;

Callers 2

setPropertyValueFunction · 0.90
updateOptionsMethod · 0.85

Calls 2

getEventOrGestureNameFunction · 0.85
isGestureFunction · 0.85

Tested by

no test coverage detected