EventListenerOptions icon indicating copy to clipboard operation
EventListenerOptions copied to clipboard

Add library which generates "touchstarted" events

Open RByers opened this issue 9 years ago • 1 comments

Like #38, another library useful for easy adoption would be to expose a new set of events: touchstarted and touchmoved (like the API discussed in #24) or aftertouchstart and aftertouchmove. These would be implemented on top of passive touch listeners (perhaps via a setTimeout(0)). This would have the advantage of making it easy for script consuming DOM events via various frameworks (like jquery/jquery#2871) to opt-in to using passive touch listeners.

Thoughts?

RByers avatar May 02 '16 16:05 RByers

Of course an obvious downside of this approach is that it doubles the event dispatch costs, which in the case of touchmove can sometimes add up to a non-trivial fraction of the frame budget.

RByers avatar May 02 '16 17:05 RByers