Force Touch events
非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!
Force Touch events are a proprietary, Apple-specific feature which makes possible (where supported by the input hardware) new interactions based on how hard the user clicks or presses down on the touchscreen or trackpad.
事件
webkitmouseforcewillbegin
非标准-
This event is fired before the
mousedown
event. Its main use is that it can beEvent.preventDefault()
ed. webkitmouseforcedown
非标准-
This event is fired after the
mousedown
event as soon as sufficient pressure has been applied for it to qualify as a "force click". webkitmouseforceup
非标准-
This event is fired after the
webkitmouseforcedown
event as soon as the pressure has been reduced sufficiently to end the "force click". webkitmouseforcechanged
非标准-
This event is fired each time the amount of pressure changes. This event first fires after the
mousedown
event and stops firing before themouseup
event.
事件属性
The following property is known to be available on the webkitmouseforcewillbegin
, mousedown
, webkitmouseforcechanged
, webkitmouseforcedown
, webkitmouseforceup
, mousemove
, and mouseup
event objects:
MouseEvent.webkitForce
非标准 只读-
当前施加于触控板/触摸屏的压力大小
常量
这些常数对于确定由 MouseEvent.webkitForce
指示的压力的相对强度是有用的:
MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN
非标准 只读-
正常点击所需的最小力量
MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN
非标准 只读-
强制点击所需的最小力量
规范
*不是任何规格的一部分。*苹果在 Mac 开发者图书馆有一个描述。