(name: string, view: ViewBase)
| 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. |
| 82 | export 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 | |
| 93 | export class Binding { |
| 94 | private source: WeakRef<Object>; |
no test coverage detected