I searched for the past 30 minutes, but didn\'t find a solution.
I want to trigger a touchstart event on an element.
This fires the touchs
In 2019, we can use TouchEvent and Touch.
Touchis an experimental technology
For example,
const touch = new Touch({
identifier: "123",
target: target,
});
const touchEvent = new TouchEvent("touchstart", {
touches: [touch],
view: window,
cancelable: true,
bubbles: true,
});
target.dispatchEvent(touchEvent);
I created gist. try it simple.