web_sys/features/
gen_UiEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "Event",
9 extends = "::js_sys::Object",
10 js_name = "UIEvent",
11 typescript_type = "UIEvent"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `UiEvent` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
19 pub type UiEvent;
20 #[cfg(feature = "Window")]
21 #[wasm_bindgen(method, getter, js_class = "UIEvent", js_name = "view")]
22 #[doc = "Getter for the `view` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/view)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `UiEvent`, `Window`*"]
27 pub fn view(this: &UiEvent) -> Option<Window>;
28 #[wasm_bindgen(method, getter, js_class = "UIEvent", js_name = "detail")]
29 #[doc = "Getter for the `detail` field of this object."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
34 pub fn detail(this: &UiEvent) -> i32;
35 #[wasm_bindgen(method, getter, js_class = "UIEvent", js_name = "layerX")]
36 #[doc = "Getter for the `layerX` field of this object."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/layerX)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
41 pub fn layer_x(this: &UiEvent) -> i32;
42 #[wasm_bindgen(method, getter, js_class = "UIEvent", js_name = "layerY")]
43 #[doc = "Getter for the `layerY` field of this object."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/layerY)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
48 pub fn layer_y(this: &UiEvent) -> i32;
49 #[wasm_bindgen(method, getter, js_class = "UIEvent", js_name = "pageX")]
50 #[doc = "Getter for the `pageX` field of this object."]
51 #[doc = ""]
52 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/pageX)"]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
55 pub fn page_x(this: &UiEvent) -> i32;
56 #[wasm_bindgen(method, getter, js_class = "UIEvent", js_name = "pageY")]
57 #[doc = "Getter for the `pageY` field of this object."]
58 #[doc = ""]
59 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/pageY)"]
60 #[doc = ""]
61 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
62 pub fn page_y(this: &UiEvent) -> i32;
63 #[wasm_bindgen(method, getter, js_class = "UIEvent", js_name = "which")]
64 #[doc = "Getter for the `which` field of this object."]
65 #[doc = ""]
66 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/which)"]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
69 pub fn which(this: &UiEvent) -> u32;
70 #[cfg(feature = "Node")]
71 #[wasm_bindgen(method, getter, js_class = "UIEvent", js_name = "rangeParent")]
72 #[doc = "Getter for the `rangeParent` field of this object."]
73 #[doc = ""]
74 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/rangeParent)"]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `Node`, `UiEvent`*"]
77 pub fn range_parent(this: &UiEvent) -> Option<Node>;
78 #[wasm_bindgen(method, getter, js_class = "UIEvent", js_name = "rangeOffset")]
79 #[doc = "Getter for the `rangeOffset` field of this object."]
80 #[doc = ""]
81 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/rangeOffset)"]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
84 pub fn range_offset(this: &UiEvent) -> i32;
85 #[wasm_bindgen(catch, constructor, js_class = "UIEvent")]
86 #[doc = "The `new UiEvent(..)` constructor, creating a new instance of `UiEvent`."]
87 #[doc = ""]
88 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/UIEvent)"]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
91 pub fn new(type_: &str) -> Result<UiEvent, JsValue>;
92 #[cfg(feature = "UiEventInit")]
93 #[wasm_bindgen(catch, constructor, js_class = "UIEvent")]
94 #[doc = "The `new UiEvent(..)` constructor, creating a new instance of `UiEvent`."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/UIEvent)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `UiEvent`, `UiEventInit`*"]
99 pub fn new_with_event_init_dict(
100 type_: &str,
101 event_init_dict: &UiEventInit,
102 ) -> Result<UiEvent, JsValue>;
103 #[wasm_bindgen(method, js_class = "UIEvent", js_name = "initUIEvent")]
104 #[doc = "The `initUIEvent()` method."]
105 #[doc = ""]
106 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
107 #[doc = ""]
108 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
109 pub fn init_ui_event(this: &UiEvent, a_type: &str);
110 #[wasm_bindgen(method, js_class = "UIEvent", js_name = "initUIEvent")]
111 #[doc = "The `initUIEvent()` method."]
112 #[doc = ""]
113 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
114 #[doc = ""]
115 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
116 pub fn init_ui_event_with_a_can_bubble(this: &UiEvent, a_type: &str, a_can_bubble: bool);
117 #[wasm_bindgen(method, js_class = "UIEvent", js_name = "initUIEvent")]
118 #[doc = "The `initUIEvent()` method."]
119 #[doc = ""]
120 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
121 #[doc = ""]
122 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
123 pub fn init_ui_event_with_a_can_bubble_and_a_cancelable(
124 this: &UiEvent,
125 a_type: &str,
126 a_can_bubble: bool,
127 a_cancelable: bool,
128 );
129 #[cfg(feature = "Window")]
130 #[wasm_bindgen(method, js_class = "UIEvent", js_name = "initUIEvent")]
131 #[doc = "The `initUIEvent()` method."]
132 #[doc = ""]
133 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
134 #[doc = ""]
135 #[doc = "*This API requires the following crate features to be activated: `UiEvent`, `Window`*"]
136 pub fn init_ui_event_with_a_can_bubble_and_a_cancelable_and_a_view(
137 this: &UiEvent,
138 a_type: &str,
139 a_can_bubble: bool,
140 a_cancelable: bool,
141 a_view: Option<&Window>,
142 );
143 #[cfg(feature = "Window")]
144 #[wasm_bindgen(method, js_class = "UIEvent", js_name = "initUIEvent")]
145 #[doc = "The `initUIEvent()` method."]
146 #[doc = ""]
147 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/initUIEvent)"]
148 #[doc = ""]
149 #[doc = "*This API requires the following crate features to be activated: `UiEvent`, `Window`*"]
150 pub fn init_ui_event_with_a_can_bubble_and_a_cancelable_and_a_view_and_a_detail(
151 this: &UiEvent,
152 a_type: &str,
153 a_can_bubble: bool,
154 a_cancelable: bool,
155 a_view: Option<&Window>,
156 a_detail: i32,
157 );
158}
159impl UiEvent {
160 #[doc = "The `UIEvent.SCROLL_PAGE_UP` const."]
161 #[doc = ""]
162 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
163 pub const SCROLL_PAGE_UP: i32 = -32768i64 as i32;
164 #[doc = "The `UIEvent.SCROLL_PAGE_DOWN` const."]
165 #[doc = ""]
166 #[doc = "*This API requires the following crate features to be activated: `UiEvent`*"]
167 pub const SCROLL_PAGE_DOWN: i32 = 32768u64 as i32;
168}