web_sys/features/
gen_CustomEvent.rs1#![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 = CustomEvent , typescript_type = "CustomEvent")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `CustomEvent` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `CustomEvent`*"]
14 pub type CustomEvent;
15 # [wasm_bindgen (structural , method , getter , js_class = "CustomEvent" , js_name = detail)]
16 #[doc = "Getter for the `detail` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `CustomEvent`*"]
21 pub fn detail(this: &CustomEvent) -> ::wasm_bindgen::JsValue;
22 #[wasm_bindgen(catch, constructor, js_class = "CustomEvent")]
23 #[doc = "The `new CustomEvent(..)` constructor, creating a new instance of `CustomEvent`."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `CustomEvent`*"]
28 pub fn new(type_: &str) -> Result<CustomEvent, JsValue>;
29 #[cfg(feature = "CustomEventInit")]
30 #[wasm_bindgen(catch, constructor, js_class = "CustomEvent")]
31 #[doc = "The `new CustomEvent(..)` constructor, creating a new instance of `CustomEvent`."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `CustomEvent`, `CustomEventInit`*"]
36 pub fn new_with_event_init_dict(
37 type_: &str,
38 event_init_dict: &CustomEventInit,
39 ) -> Result<CustomEvent, JsValue>;
40 # [wasm_bindgen (method , structural , js_class = "CustomEvent" , js_name = initCustomEvent)]
41 #[doc = "The `initCustomEvent()` method."]
42 #[doc = ""]
43 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/initCustomEvent)"]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `CustomEvent`*"]
46 pub fn init_custom_event(this: &CustomEvent, type_: &str);
47 # [wasm_bindgen (method , structural , js_class = "CustomEvent" , js_name = initCustomEvent)]
48 #[doc = "The `initCustomEvent()` method."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/initCustomEvent)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `CustomEvent`*"]
53 pub fn init_custom_event_with_can_bubble(this: &CustomEvent, type_: &str, can_bubble: bool);
54 # [wasm_bindgen (method , structural , js_class = "CustomEvent" , js_name = initCustomEvent)]
55 #[doc = "The `initCustomEvent()` method."]
56 #[doc = ""]
57 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/initCustomEvent)"]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `CustomEvent`*"]
60 pub fn init_custom_event_with_can_bubble_and_cancelable(
61 this: &CustomEvent,
62 type_: &str,
63 can_bubble: bool,
64 cancelable: bool,
65 );
66 # [wasm_bindgen (method , structural , js_class = "CustomEvent" , js_name = initCustomEvent)]
67 #[doc = "The `initCustomEvent()` method."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/initCustomEvent)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `CustomEvent`*"]
72 pub fn init_custom_event_with_can_bubble_and_cancelable_and_detail(
73 this: &CustomEvent,
74 type_: &str,
75 can_bubble: bool,
76 cancelable: bool,
77 detail: &::wasm_bindgen::JsValue,
78 );
79}