dispatch-events.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. import { ModifierKeys } from './event-objects';
  9. /**
  10. * Utility to dispatch any event on a Node.
  11. * @docs-private
  12. */
  13. export declare function dispatchEvent(node: Node | Window, event: Event): Event;
  14. /**
  15. * Shorthand to dispatch a fake event on a specified node.
  16. * @docs-private
  17. */
  18. export declare function dispatchFakeEvent(node: Node | Window, type: string, canBubble?: boolean): Event;
  19. /**
  20. * Shorthand to dispatch a keyboard event with a specified key code.
  21. * @docs-private
  22. */
  23. export declare function dispatchKeyboardEvent(node: Node, type: string, keyCode?: number, key?: string, target?: Element, modifiers?: ModifierKeys): KeyboardEvent;
  24. /**
  25. * Shorthand to dispatch a mouse event on the specified coordinates.
  26. * @docs-private
  27. */
  28. export declare function dispatchMouseEvent(node: Node, type: string, x?: number, y?: number, event?: MouseEvent): MouseEvent;
  29. /**
  30. * Shorthand to dispatch a touch event on the specified coordinates.
  31. * @docs-private
  32. */
  33. export declare function dispatchTouchEvent(node: Node, type: string, x?: number, y?: number): Event;