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