1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GamepadHapticActuator , typescript_type = "GamepadHapticActuator")] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `GamepadHapticActuator` class."] 9 #[doc = ""] 10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadHapticActuator)"] 11 #[doc = ""] 12 #[doc = "*This API requires the following crate features to be activated: `GamepadHapticActuator`*"] 13 pub type GamepadHapticActuator; 14 #[cfg(feature = "GamepadHapticActuatorType")] 15 # [wasm_bindgen (structural , method , getter , js_class = "GamepadHapticActuator" , js_name = type)] 16 #[doc = "Getter for the `type` field of this object."] 17 #[doc = ""] 18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadHapticActuator/type)"] 19 #[doc = ""] 20 #[doc = "*This API requires the following crate features to be activated: `GamepadHapticActuator`, `GamepadHapticActuatorType`*"] type_(this: &GamepadHapticActuator) -> GamepadHapticActuatorType21 pub fn type_(this: &GamepadHapticActuator) -> GamepadHapticActuatorType; 22 # [wasm_bindgen (catch , method , structural , js_class = "GamepadHapticActuator" , js_name = pulse)] 23 #[doc = "The `pulse()` method."] 24 #[doc = ""] 25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GamepadHapticActuator/pulse)"] 26 #[doc = ""] 27 #[doc = "*This API requires the following crate features to be activated: `GamepadHapticActuator`*"] pulse( this: &GamepadHapticActuator, value: f64, duration: f64, ) -> Result<::js_sys::Promise, JsValue>28 pub fn pulse( 29 this: &GamepadHapticActuator, 30 value: f64, 31 duration: f64, 32 ) -> Result<::js_sys::Promise, JsValue>; 33 } 34