(e: KeyboardEvent | MouseEvent)
| 1 | export function isFormEvent(e: KeyboardEvent | MouseEvent) { |
| 2 | const t = e.target as HTMLFormElement; |
| 3 | if (!t) { |
| 4 | return false; |
| 5 | } |
| 6 | |
| 7 | if (t.form || /^(INPUT|SELECT|TEXTAREA)$/.test(t.tagName)) { |
| 8 | return true; |
| 9 | } |
| 10 | if (t instanceof HTMLElement && /write/.test(window.getComputedStyle(t).getPropertyValue('-webkit-user-modify'))) { |
| 11 | return true; |
| 12 | } |
| 13 | return false; |
| 14 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…