Skip to main content

web_sys/features/
gen_InputEvent.rs

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