跳转到主要内容

Element: webkitmouseforcechanged event

{{APIRef("Force Touch Events")}}{{Non-standard_header}}

The non-standard webkitmouseforcechanged event is fired by Safari each time the amount of pressure changes on the trackpad/touchscreen.

webkitmouseforcechanged is a proprietary, WebKit-specific event introduced by Apple to support their Force Touch events feature.

This event first fires after the {{domxref("Element/mousedown_event", "mousedown")}}mousedown event and stops firing before the {{domxref("Element/mouseup_event", "mouseup")}}mouseup event.

Syntax

Use the event name in {{domxref("EventTarget/addEventListener", "addEventListener()")}}:

addEventListener("webkitmouseforcechanged", (event) => { })

Alternatively, assign to the event handler property of the interface:

onwebkitmouseforcechanged = (event) => { }

Event type

A {{domxref("MouseEvent")}}MouseEvent. Inherits from {{domxref("UIEvent")}}UIEvent and {{domxref("Event")}}Event.

{{InheritanceDiagram("MouseEvent")}}

Specifications

Not part of any specification. Apple has a description at the Mac Developer Library.

Browser compatibility

{{Compat}}

See also