maxcountryman_web_sys/features/
gen_CustomEvent.rs

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