Simulate a mouse event on the coordinates provided by an event's clientX
and
clientY
coordinates. Additionally, debug
can be enabled to see the cursor position.
Example
const event = { clientX: 500, clientY: 500 }; // sample event
$$$.simulate('click', event); // clicks the positions provided in the event
$$$.simulate('click', event, true); // enable cursor visual with `debug` set to `true`
Parameters:
Name | Type | Attributes | Default | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type |
string | The type of mouse event to simulate. |
|||||||||||
event |
object | A mouse event that is used for trigger an event. Properties
|
|||||||||||
debug |
boolean |
<optional> |
false
|
Allows to turn on the visuals for the |
Returns:
- Chainable api by returning the instance.
- Type
- self