maxcountryman_web_sys/features/
gen_InputEvent.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = UiEvent , extends = Event , extends = :: js_sys :: Object , js_name = InputEvent , typescript_type = "InputEvent")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `InputEvent` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `InputEvent`*"]
13 pub type InputEvent;
14 # [wasm_bindgen (structural , method , getter , js_class = "InputEvent" , js_name = isComposing)]
15 #[doc = "Getter for the `isComposing` field of this object."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/isComposing)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `InputEvent`*"]
20 pub fn is_composing(this: &InputEvent) -> bool;
21 # [wasm_bindgen (structural , method , getter , js_class = "InputEvent" , js_name = inputType)]
22 #[doc = "Getter for the `inputType` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/inputType)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `InputEvent`*"]
27 pub fn input_type(this: &InputEvent) -> String;
28 # [wasm_bindgen (structural , method , getter , js_class = "InputEvent" , js_name = data)]
29 #[doc = "Getter for the `data` field of this object."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/data)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `InputEvent`*"]
34 pub fn data(this: &InputEvent) -> Option<String>;
35 #[cfg(feature = "DataTransfer")]
36 # [wasm_bindgen (structural , method , getter , js_class = "InputEvent" , js_name = dataTransfer)]
37 #[doc = "Getter for the `dataTransfer` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/dataTransfer)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `InputEvent`*"]
42 pub fn data_transfer(this: &InputEvent) -> Option<DataTransfer>;
43 #[wasm_bindgen(catch, constructor, js_class = "InputEvent")]
44 #[doc = "The `new InputEvent(..)` constructor, creating a new instance of `InputEvent`."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/InputEvent)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `InputEvent`*"]
49 pub fn new(type_: &str) -> Result<InputEvent, JsValue>;
50 #[cfg(feature = "InputEventInit")]
51 #[wasm_bindgen(catch, constructor, js_class = "InputEvent")]
52 #[doc = "The `new InputEvent(..)` constructor, creating a new instance of `InputEvent`."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/InputEvent)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `InputEvent`, `InputEventInit`*"]
57 pub fn new_with_event_init_dict(
58 type_: &str,
59 event_init_dict: &InputEventInit,
60 ) -> Result<InputEvent, JsValue>;
61 # [wasm_bindgen (method , structural , js_class = "InputEvent" , js_name = getTargetRanges)]
62 #[doc = "The `getTargetRanges()` method."]
63 #[doc = ""]
64 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent/getTargetRanges)"]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `InputEvent`*"]
67 pub fn get_target_ranges(this: &InputEvent) -> ::js_sys::Array;
68}