I am currently developing a browser extension that is able to generate simulated TouchEvents
. My project is functional in Chrome, but I have encountered an issue with Firefox not supporting the TouchEvents
feature. When attempting to create a new TouchEvent
, Firefox displays the following error message:
ReferenceError: TouchEvent is not defined
I am exploring options to either implement TouchEvent
within the extension or find an alternative method to dispatch an event with all the necessary properties similar to a TouchEvent
.
Creating a CustomEvent
and adding additional properties such as touches
, targetTouches
, and changedTouches
to mimic a TouchEvent
is proving to be ineffective, as these properties are not maintained once the event reaches the webpage.
Does anyone know of a solution to achieve my goal, or should I abandon hope of making this work on Firefox?