@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
14 lines (13 loc) • 482 B
TypeScript
/**
* Shorthand to dispatch a fake event on a specified node.
*
* @param node - The Node that should dispatch the fake event
* @param type - The event type
* @param canBubble - Define if the event can bubble up the DOM
* @returns The event
*
* @example
* dispatchFakeEvent(myNativeElement, 'mousedown');
* dispatchFakeEvent(myNativeElement, 'mousedown', true);
*/
export declare const dispatchFakeEvent: (node: Node | Window, type: string, canBubble?: boolean) => Event;