@terminus/ngx-tools
Version:
[![CircleCI][circle-badge]][circle-link] [![codecov][codecov-badge]][codecov-project] [![semantic-release][semantic-release-badge]][semantic-release] [![MIT License][license-image]][license-url] <br> [![NPM version][npm-version-image]][npm-url] [![Github
16 lines (15 loc) • 584 B
TypeScript
/**
* Shorthand to dispatch a mouse event on the specified coordinates.
*
* @param node - The Node that should dispatch the mouse event
* @param type - The event type
* @param x - The location on the X axis
* @param y - The location on the Y axis
* @param event - The event
* @returns The mouse event
*
* @example
* dispatchMouseEvent(myNativeElement, 'mousedown');
* dispatchMouseEvent(myNativeElement, 'mousedown', 10, 10, myCustomEvent);
*/
export declare const dispatchMouseEvent: (node: Node, type: string, x?: number, y?: number, event?: MouseEvent) => MouseEvent;