Microsoft Edge Origin Trials Developer Console

HapticsDevice API

Enable the rich HapticsDevice API on PointerEvents for devices that support it.

Available from Microsoft Edge 94 to 116

End Date 12/31/2023


In today's device ecosystem, there are several types of haptic-enabled surfaces:

  • In-built haptic engines (i.e. mobile devices) Laptop/external touchpads
  • Game/XR controllers
  • Peripheral hardware such as Surface Dial

While solutions such as navigator.vibrate() and GamepadHapticActuator aim to expose a limited set of these haptic capabilities to the web, web developers today do not have the ability to harness the majority of these surfaces as they do on native platforms. This prevents them from building tactile experiences that physically engage users, help them understand when critical activities have succeeded or failed, or immerse them by simulating virtual textures/actions.

The HapticsDevice API aims to meet the following goals:

  1. Provide web developers with access to more haptic-enabled devices and features during user interaction
  2. Give developers a mechanism to leverage both pre-defined and custom haptic waveforms on hardware/platforms that support them
  3. Define a flexible enough API surface to enable support for extensions in the future (see Potential Extensions)

You can learn more about this API here.