Definition
Gamepad defines GamepadHapticActuator
[Exposed=Window]
interface GamepadHapticActuator {
[SameObject] readonly attribute FrozenArray<GamepadHapticEffectType> effects;
Promise<GamepadHapticsResult> playEffect(
GamepadHapticEffectType type,
optional GamepadEffectParameters params = {}
);
Promise<GamepadHapticsResult> reset();
};
This interface is extended in the following specifications:
- Gamepad Extensions
[Exposed=Window] partial interface GamepadHapticActuator { Promise<boolean> pulse(double value, double duration); };
Consolidated IDL (across mixin and partials)
[Exposed=Window]
interface GamepadHapticActuator {
[SameObject] readonly attribute FrozenArray<GamepadHapticEffectType> effects;
Promise<GamepadHapticsResult> playEffect(
GamepadHapticEffectType type,
optional GamepadEffectParameters params = {}
);
Promise<GamepadHapticsResult> reset();
Promise<boolean> pulse(double value, double duration);
};
Methods and attributes that return objects implementing GamepadHapticActuator
Referring IDL interfaces/dictionaries
Referring specifications
- Gamepad Extensions refers to
GamepadHapticActuator