getPredictedEvents method

JSArray<PointerEvent> getPredictedEvents()

The getPredictedEvents() method of the PointerEvent interface returns a sequence of PointerEvent instances that are estimated future pointer positions. How the predicted positions are calculated depends on the user agent, but they are based on past points, current velocity, and trajectory.

Applications can use the predicted events to "draw ahead" to a predicted position which may reduce perceived latency depending on the application's interpretation of the predicted events and the use case.

For an illustration of predicted events, see Figure 8 in the specification.

Implementation

external JSArray<PointerEvent> getPredictedEvents();