1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = Event , typescript_type = "Event" ) ]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `Event` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub type Event;
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = type ) ]
    #[doc = "Getter for the `type` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/type)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn type_(this: &Event) -> String;
    #[cfg(feature = "EventTarget")]
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = target ) ]
    #[doc = "Getter for the `target` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/target)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`, `EventTarget`*"]
    pub fn target(this: &Event) -> Option<EventTarget>;
    #[cfg(feature = "EventTarget")]
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = currentTarget ) ]
    #[doc = "Getter for the `currentTarget` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`, `EventTarget`*"]
    pub fn current_target(this: &Event) -> Option<EventTarget>;
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = eventPhase ) ]
    #[doc = "Getter for the `eventPhase` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/eventPhase)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn event_phase(this: &Event) -> u16;
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = bubbles ) ]
    #[doc = "Getter for the `bubbles` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/bubbles)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn bubbles(this: &Event) -> bool;
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = cancelable ) ]
    #[doc = "Getter for the `cancelable` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelable)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn cancelable(this: &Event) -> bool;
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = defaultPrevented ) ]
    #[doc = "Getter for the `defaultPrevented` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/defaultPrevented)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn default_prevented(this: &Event) -> bool;
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = composed ) ]
    #[doc = "Getter for the `composed` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/composed)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn composed(this: &Event) -> bool;
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = isTrusted ) ]
    #[doc = "Getter for the `isTrusted` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn is_trusted(this: &Event) -> bool;
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = timeStamp ) ]
    #[doc = "Getter for the `timeStamp` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/timeStamp)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn time_stamp(this: &Event) -> f64;
    # [ wasm_bindgen ( structural , method , getter , js_class = "Event" , js_name = cancelBubble ) ]
    #[doc = "Getter for the `cancelBubble` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelBubble)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn cancel_bubble(this: &Event) -> bool;
    # [ wasm_bindgen ( structural , method , setter , js_class = "Event" , js_name = cancelBubble ) ]
    #[doc = "Setter for the `cancelBubble` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelBubble)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn set_cancel_bubble(this: &Event, value: bool);
    #[wasm_bindgen(catch, constructor, js_class = "Event")]
    #[doc = "The `new Event(..)` constructor, creating a new instance of `Event`."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn new(type_: &str) -> Result<Event, JsValue>;
    #[cfg(feature = "EventInit")]
    #[wasm_bindgen(catch, constructor, js_class = "Event")]
    #[doc = "The `new Event(..)` constructor, creating a new instance of `Event`."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`, `EventInit`*"]
    pub fn new_with_event_init_dict(
        type_: &str,
        event_init_dict: &EventInit,
    ) -> Result<Event, JsValue>;
    # [ wasm_bindgen ( method , structural , js_class = "Event" , js_name = composedPath ) ]
    #[doc = "The `composedPath()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn composed_path(this: &Event) -> ::js_sys::Array;
    # [ wasm_bindgen ( method , structural , js_class = "Event" , js_name = initEvent ) ]
    #[doc = "The `initEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/initEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn init_event(this: &Event, type_: &str);
    # [ wasm_bindgen ( method , structural , js_class = "Event" , js_name = initEvent ) ]
    #[doc = "The `initEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/initEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn init_event_with_bubbles(this: &Event, type_: &str, bubbles: bool);
    # [ wasm_bindgen ( method , structural , js_class = "Event" , js_name = initEvent ) ]
    #[doc = "The `initEvent()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/initEvent)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn init_event_with_bubbles_and_cancelable(
        this: &Event,
        type_: &str,
        bubbles: bool,
        cancelable: bool,
    );
    # [ wasm_bindgen ( method , structural , js_class = "Event" , js_name = preventDefault ) ]
    #[doc = "The `preventDefault()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn prevent_default(this: &Event);
    # [ wasm_bindgen ( method , structural , js_class = "Event" , js_name = stopImmediatePropagation ) ]
    #[doc = "The `stopImmediatePropagation()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/stopImmediatePropagation)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn stop_immediate_propagation(this: &Event);
    # [ wasm_bindgen ( method , structural , js_class = "Event" , js_name = stopPropagation ) ]
    #[doc = "The `stopPropagation()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub fn stop_propagation(this: &Event);
}
impl Event {
    #[doc = "The `Event.NONE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub const NONE: u16 = 0i64 as u16;
    #[doc = "The `Event.CAPTURING_PHASE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub const CAPTURING_PHASE: u16 = 1u64 as u16;
    #[doc = "The `Event.AT_TARGET` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub const AT_TARGET: u16 = 2u64 as u16;
    #[doc = "The `Event.BUBBLING_PHASE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `Event`*"]
    pub const BUBBLING_PHASE: u16 = 3u64 as u16;
}