Skip to main content

web_sys/features/
gen_CompositionEvent.rs

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