Enable the rich HapticsDevice API on PointerEvents for devices that support it.
Available from Microsoft Edge Edge 94 to Edge 100
End Date 2022/04/28
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:
- Provide web developers with access to more haptic-enabled devices and features during user interaction
- Give developers a mechanism to leverage both pre-defined and custom haptic waveforms on hardware/platforms that support them
- 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.登録する