Re: New webkitmouseforce* events in WebKit

Hah, I do not really understand them.

Does anyone know what is "the user agent’s default force click features"?
My first though here: They do not want PointerEvents, but we (web dev) will
use this API to polyfill PE in Safari.

P.S. This is just first impression.

2015-03-26 16:38 GMT+02:00 Rick Byers <rbyers@chromium.org>:

> People here will probably be interested in these new event types that just
> landed in WebKit <https://bugs.webkit.org/show_bug.cgi?id=142836>.
>
> Here's the relevant API details from the ChangeLog:
>
>
> This patch adds six new events for the force click gesture:
>
> webkitmouseforcewillbegin -> Event is sent just before mousedown to
> indicate that
> force can be perceived if the user presses any harder. The author should
> prevent
> default on this event to both prevent the user agent’s default force click
> features and to receive the other 5 events.
>
> webkitmouseforcechanged -> This event fires whenever force changes between
> the
> mousedown and mouseup. It is a new type of mouse event that includes a
> force
> variable which is a normalized number between 0 (corresponds to click) and
> 1
> (corresponds to force click). In this patch, I have only added code to
> send this
> event between mousedown and mouseforcedown, but as a followup patch, we
> plan to
> send it through mouseup.
>
> webkitmouseforcecancelled -> If the user releases their finger from the
> trackpad
> after pressing hard enough to send webkitmouseforcewillbegin events but
> not hard
> enough to force click, this event will be sent to indicate that the user
> bailed
> out on the gesture.
>
> webkitmouseforcedown -> The down part of the force click.
>
> webkitmouseforceup -> The up part of the force click. This event is added
> in this
> patch, but does not yet fire. That is work for a follow-up patch.
>
> webkitmouseforceclick -> The equivalent of the click event for the force
> click.
> Should fire just after webkitmouseforceup. This event is added in this
> patch, but
> does not yet fire. That is work for a follow-up patch.
>
>
>


-- 
@nekrtemplar <https://twitter.com/nekrtemplar>

Received on Thursday, 26 March 2015 15:20:13 UTC