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