dispatch-events.d.ts 1.0 KB

1234567891011121314
  1. /**
  2. * Use of this source code is governed by an MIT-style license that can be
  3. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  4. */
  5. /** Utility to dispatch any event on a Node. */
  6. export declare function dispatchEvent(node: Node | Window, event: Event): Event;
  7. /** Shorthand to dispatch a fake event on a specified node. */
  8. export declare function dispatchFakeEvent(node: Node | Window, type: string, canBubble?: boolean): Event;
  9. /** Shorthand to dispatch a keyboard event with a specified key code. */
  10. export declare function dispatchKeyboardEvent(node: Node, type: string, keyCode: number, target?: Element): KeyboardEvent;
  11. /** Shorthand to dispatch a mouse event on the specified coordinates. */
  12. export declare function dispatchMouseEvent(node: Node, type: string, x?: number, y?: number, event?: MouseEvent): MouseEvent;
  13. /** Shorthand to dispatch a touch event on the specified coordinates. */
  14. export declare function dispatchTouchEvent(node: Node, type: string, x?: number, y?: number): TouchEvent;