1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = MessageEvent , typescript_type = "MessageEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `MessageEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
14 pub type MessageEvent;
15 # [wasm_bindgen (structural , method , getter , js_class = "MessageEvent" , js_name = data)]
16 #[doc = "Getter for the `data` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
21 pub fn data(this: &MessageEvent) -> ::wasm_bindgen::JsValue;
22 # [wasm_bindgen (structural , method , getter , js_class = "MessageEvent" , js_name = origin)]
23 #[doc = "Getter for the `origin` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/origin)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
28 pub fn origin(this: &MessageEvent) -> String;
29 # [wasm_bindgen (structural , method , getter , js_class = "MessageEvent" , js_name = lastEventId)]
30 #[doc = "Getter for the `lastEventId` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/lastEventId)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
35 pub fn last_event_id(this: &MessageEvent) -> String;
36 # [wasm_bindgen (structural , method , getter , js_class = "MessageEvent" , js_name = source)]
37 #[doc = "Getter for the `source` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/source)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
42 pub fn source(this: &MessageEvent) -> Option<::js_sys::Object>;
43 # [wasm_bindgen (structural , method , getter , js_class = "MessageEvent" , js_name = ports)]
44 #[doc = "Getter for the `ports` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/ports)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
49 pub fn ports(this: &MessageEvent) -> ::js_sys::Array;
50 #[wasm_bindgen(catch, constructor, js_class = "MessageEvent")]
51 #[doc = "The `new MessageEvent(..)` constructor, creating a new instance of `MessageEvent`."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/MessageEvent)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
56 pub fn new(type_: &str) -> Result<MessageEvent, JsValue>;
57 #[cfg(feature = "MessageEventInit")]
58 #[wasm_bindgen(catch, constructor, js_class = "MessageEvent")]
59 #[doc = "The `new MessageEvent(..)` constructor, creating a new instance of `MessageEvent`."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/MessageEvent)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`, `MessageEventInit`*"]
64 pub fn new_with_event_init_dict(
65 type_: &str,
66 event_init_dict: &MessageEventInit,
67 ) -> Result<MessageEvent, JsValue>;
68 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
69 #[doc = "The `initMessageEvent()` method."]
70 #[doc = ""]
71 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
74 pub fn init_message_event(this: &MessageEvent, type_: &str);
75 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
76 #[doc = "The `initMessageEvent()` method."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
81 pub fn init_message_event_with_bubbles(this: &MessageEvent, type_: &str, bubbles: bool);
82 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
83 #[doc = "The `initMessageEvent()` method."]
84 #[doc = ""]
85 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
88 pub fn init_message_event_with_bubbles_and_cancelable(
89 this: &MessageEvent,
90 type_: &str,
91 bubbles: bool,
92 cancelable: bool,
93 );
94 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
95 #[doc = "The `initMessageEvent()` method."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
100 pub fn init_message_event_with_bubbles_and_cancelable_and_data(
101 this: &MessageEvent,
102 type_: &str,
103 bubbles: bool,
104 cancelable: bool,
105 data: &::wasm_bindgen::JsValue,
106 );
107 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
108 #[doc = "The `initMessageEvent()` method."]
109 #[doc = ""]
110 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
113 pub fn init_message_event_with_bubbles_and_cancelable_and_data_and_origin(
114 this: &MessageEvent,
115 type_: &str,
116 bubbles: bool,
117 cancelable: bool,
118 data: &::wasm_bindgen::JsValue,
119 origin: &str,
120 );
121 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
122 #[doc = "The `initMessageEvent()` method."]
123 #[doc = ""]
124 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`*"]
127 pub fn init_message_event_with_bubbles_and_cancelable_and_data_and_origin_and_last_event_id(
128 this: &MessageEvent,
129 type_: &str,
130 bubbles: bool,
131 cancelable: bool,
132 data: &::wasm_bindgen::JsValue,
133 origin: &str,
134 last_event_id: &str,
135 );
136 #[cfg(feature = "Window")]
137 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
138 #[doc = "The `initMessageEvent()` method."]
139 #[doc = ""]
140 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
141 #[doc = ""]
142 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`, `Window`*"]
143 pub fn init_message_event_with_bubbles_and_cancelable_and_data_and_origin_and_last_event_id_and_opt_window(
144 this: &MessageEvent,
145 type_: &str,
146 bubbles: bool,
147 cancelable: bool,
148 data: &::wasm_bindgen::JsValue,
149 origin: &str,
150 last_event_id: &str,
151 source: Option<&Window>,
152 );
153 #[cfg(feature = "MessagePort")]
154 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
155 #[doc = "The `initMessageEvent()` method."]
156 #[doc = ""]
157 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
158 #[doc = ""]
159 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`, `MessagePort`*"]
160 pub fn init_message_event_with_bubbles_and_cancelable_and_data_and_origin_and_last_event_id_and_opt_message_port(
161 this: &MessageEvent,
162 type_: &str,
163 bubbles: bool,
164 cancelable: bool,
165 data: &::wasm_bindgen::JsValue,
166 origin: &str,
167 last_event_id: &str,
168 source: Option<&MessagePort>,
169 );
170 #[cfg(feature = "ServiceWorker")]
171 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
172 #[doc = "The `initMessageEvent()` method."]
173 #[doc = ""]
174 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
175 #[doc = ""]
176 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`, `ServiceWorker`*"]
177 pub fn init_message_event_with_bubbles_and_cancelable_and_data_and_origin_and_last_event_id_and_opt_service_worker(
178 this: &MessageEvent,
179 type_: &str,
180 bubbles: bool,
181 cancelable: bool,
182 data: &::wasm_bindgen::JsValue,
183 origin: &str,
184 last_event_id: &str,
185 source: Option<&ServiceWorker>,
186 );
187 #[cfg(feature = "Window")]
188 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
189 #[doc = "The `initMessageEvent()` method."]
190 #[doc = ""]
191 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
192 #[doc = ""]
193 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`, `Window`*"]
194 pub fn init_message_event_with_bubbles_and_cancelable_and_data_and_origin_and_last_event_id_and_opt_window_and_ports(
195 this: &MessageEvent,
196 type_: &str,
197 bubbles: bool,
198 cancelable: bool,
199 data: &::wasm_bindgen::JsValue,
200 origin: &str,
201 last_event_id: &str,
202 source: Option<&Window>,
203 ports: &::wasm_bindgen::JsValue,
204 );
205 #[cfg(feature = "MessagePort")]
206 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
207 #[doc = "The `initMessageEvent()` method."]
208 #[doc = ""]
209 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
210 #[doc = ""]
211 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`, `MessagePort`*"]
212 pub fn init_message_event_with_bubbles_and_cancelable_and_data_and_origin_and_last_event_id_and_opt_message_port_and_ports(
213 this: &MessageEvent,
214 type_: &str,
215 bubbles: bool,
216 cancelable: bool,
217 data: &::wasm_bindgen::JsValue,
218 origin: &str,
219 last_event_id: &str,
220 source: Option<&MessagePort>,
221 ports: &::wasm_bindgen::JsValue,
222 );
223 #[cfg(feature = "ServiceWorker")]
224 # [wasm_bindgen (method , structural , js_class = "MessageEvent" , js_name = initMessageEvent)]
225 #[doc = "The `initMessageEvent()` method."]
226 #[doc = ""]
227 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/initMessageEvent)"]
228 #[doc = ""]
229 #[doc = "*This API requires the following crate features to be activated: `MessageEvent`, `ServiceWorker`*"]
230 pub fn init_message_event_with_bubbles_and_cancelable_and_data_and_origin_and_last_event_id_and_opt_service_worker_and_ports(
231 this: &MessageEvent,
232 type_: &str,
233 bubbles: bool,
234 cancelable: bool,
235 data: &::wasm_bindgen::JsValue,
236 origin: &str,
237 last_event_id: &str,
238 source: Option<&ServiceWorker>,
239 ports: &::wasm_bindgen::JsValue,
240 );
241}
242