w3c / uievents

UI Events
https://w3c.github.io/uievents/
Other
145 stars 51 forks source link

Standardize common gestures event #293

Open answershuto opened 3 years ago

answershuto commented 3 years ago

This Issue throws out a proposal on gestures.The purpose of the proposal is to solve the integration of commonly used gesture capabilities under Web standards. There are a variety of native gestures such as Pan, Long Press, Drag, etc. in client development. They are highly encapsulated which allows developers to It is more convenient to directly use these gesture capabilities to quickly develop some interactive pages with more complex interactions.

The proposal expects further expansion on element. Developers can directly bind and monitor related gesture events on element, and throw related event parameters in the callback.

element.addEventLisenter('swipe', (gestureEvent) => {
    //do something...
})

gestures

Standardize GestureEvent.It can be further expanded to satisfy the basic parameters of gesture events.

Some supplements

Is it possible?