maxcountryman_web_sys/features/
gen_CompositionEvent.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = UiEvent , extends = Event , extends = :: js_sys :: Object , js_name = CompositionEvent , typescript_type = "CompositionEvent")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `CompositionEvent` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`*"]
13    pub type CompositionEvent;
14    # [wasm_bindgen (structural , method , getter , js_class = "CompositionEvent" , js_name = data)]
15    #[doc = "Getter for the `data` field of this object."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/data)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`*"]
20    pub fn data(this: &CompositionEvent) -> Option<String>;
21    # [wasm_bindgen (structural , method , getter , js_class = "CompositionEvent" , js_name = locale)]
22    #[doc = "Getter for the `locale` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/locale)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`*"]
27    pub fn locale(this: &CompositionEvent) -> String;
28    #[wasm_bindgen(catch, constructor, js_class = "CompositionEvent")]
29    #[doc = "The `new CompositionEvent(..)` constructor, creating a new instance of `CompositionEvent`."]
30    #[doc = ""]
31    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/CompositionEvent)"]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`*"]
34    pub fn new(type_: &str) -> Result<CompositionEvent, JsValue>;
35    #[cfg(feature = "CompositionEventInit")]
36    #[wasm_bindgen(catch, constructor, js_class = "CompositionEvent")]
37    #[doc = "The `new CompositionEvent(..)` constructor, creating a new instance of `CompositionEvent`."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/CompositionEvent)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`, `CompositionEventInit`*"]
42    pub fn new_with_event_init_dict(
43        type_: &str,
44        event_init_dict: &CompositionEventInit,
45    ) -> Result<CompositionEvent, JsValue>;
46    # [wasm_bindgen (method , structural , js_class = "CompositionEvent" , js_name = initCompositionEvent)]
47    #[doc = "The `initCompositionEvent()` method."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/initCompositionEvent)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`*"]
52    pub fn init_composition_event(this: &CompositionEvent, type_arg: &str);
53    # [wasm_bindgen (method , structural , js_class = "CompositionEvent" , js_name = initCompositionEvent)]
54    #[doc = "The `initCompositionEvent()` method."]
55    #[doc = ""]
56    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/initCompositionEvent)"]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`*"]
59    pub fn init_composition_event_with_can_bubble_arg(
60        this: &CompositionEvent,
61        type_arg: &str,
62        can_bubble_arg: bool,
63    );
64    # [wasm_bindgen (method , structural , js_class = "CompositionEvent" , js_name = initCompositionEvent)]
65    #[doc = "The `initCompositionEvent()` method."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/initCompositionEvent)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`*"]
70    pub fn init_composition_event_with_can_bubble_arg_and_cancelable_arg(
71        this: &CompositionEvent,
72        type_arg: &str,
73        can_bubble_arg: bool,
74        cancelable_arg: bool,
75    );
76    #[cfg(feature = "Window")]
77    # [wasm_bindgen (method , structural , js_class = "CompositionEvent" , js_name = initCompositionEvent)]
78    #[doc = "The `initCompositionEvent()` method."]
79    #[doc = ""]
80    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/initCompositionEvent)"]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`, `Window`*"]
83    pub fn init_composition_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg(
84        this: &CompositionEvent,
85        type_arg: &str,
86        can_bubble_arg: bool,
87        cancelable_arg: bool,
88        view_arg: Option<&Window>,
89    );
90    #[cfg(feature = "Window")]
91    # [wasm_bindgen (method , structural , js_class = "CompositionEvent" , js_name = initCompositionEvent)]
92    #[doc = "The `initCompositionEvent()` method."]
93    #[doc = ""]
94    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/initCompositionEvent)"]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`, `Window`*"]
97    pub fn init_composition_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_data_arg(
98        this: &CompositionEvent,
99        type_arg: &str,
100        can_bubble_arg: bool,
101        cancelable_arg: bool,
102        view_arg: Option<&Window>,
103        data_arg: Option<&str>,
104    );
105    #[cfg(feature = "Window")]
106    # [wasm_bindgen (method , structural , js_class = "CompositionEvent" , js_name = initCompositionEvent)]
107    #[doc = "The `initCompositionEvent()` method."]
108    #[doc = ""]
109    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent/initCompositionEvent)"]
110    #[doc = ""]
111    #[doc = "*This API requires the following crate features to be activated: `CompositionEvent`, `Window`*"]
112    pub fn init_composition_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_data_arg_and_locale_arg(
113        this: &CompositionEvent,
114        type_arg: &str,
115        can_bubble_arg: bool,
116        cancelable_arg: bool,
117        view_arg: Option<&Window>,
118        data_arg: Option<&str>,
119        locale_arg: &str,
120    );
121}