docs.rodeo

MDN Web Docs mirror

Element: webkitmouseforcewillbegin event

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

Safari for macOS fires the non-standard webkitmouseforcewillbegin event at an {{domxref("Element")}}  before firing the initial {{domxref("Element/mousedown_event", "mousedown")}}  event.

This offers the opportunity to tell the system not to trigger any default Force Touch actions if and when the click turns into a Force Touch events.

To instruct macOS not to engage any default Force Touch actions if the user apply enough pressure to activate a Force Touch event, call {{domxref("Event.preventDefault", "preventDefault()")}}  on the webkitmouseforcewillbegin event object.

webkitmouseforcewillbegin is a proprietary, WebKit-specific event. It is part of the Force Touch events feature.

Syntax

Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}} , or set an event handler property.

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

onwebkitmouseforcewillbegin = (event) => { }

Event type

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

{{InheritanceDiagram("MouseEvent")}} 

Event properties

This interface also inherits properties of its parents, {{domxref("UIEvent")}}  and {{domxref("Event")}} .

Specifications

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

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN