( this: Instance, target: Element, type: K, init?: EventTypeInit<K>, preventDefault: boolean = false, )
| 6 | import {createEvent} from './createEvent' |
| 7 | |
| 8 | export function dispatchUIEvent<K extends EventType>( |
| 9 | this: Instance, |
| 10 | target: Element, |
| 11 | type: K, |
| 12 | init?: EventTypeInit<K>, |
| 13 | preventDefault: boolean = false, |
| 14 | ) { |
| 15 | if (isMouseEvent(type) || isKeyboardEvent(type)) { |
| 16 | init = { |
| 17 | ...init, |
| 18 | ...this.system.getUIEventModifiers(), |
| 19 | } as EventTypeInit<K> |
| 20 | } |
| 21 | |
| 22 | const event = createEvent(type, target, init) |
| 23 | |
| 24 | return dispatchEvent.call(this, target, event, preventDefault) |
| 25 | } |
| 26 | |
| 27 | export function dispatchEvent( |
| 28 | this: Instance, |
nothing calls this directly
no test coverage detected