#[repr(C)]pub struct Event {Show 14 fields
reflector_: Reflector,
current_target: MutNullableDom<EventTarget>,
target: MutNullableDom<EventTarget>,
type_: DomRefCell<Atom>,
phase: Cell<EventPhase>,
canceled: Cell<EventDefault>,
stop_propagation: Cell<bool>,
stop_immediate: Cell<bool>,
cancelable: Cell<bool>,
bubbles: Cell<bool>,
trusted: Cell<bool>,
dispatching: Cell<bool>,
initialized: Cell<bool>,
time_stamp: CrossProcessInstant,
}
Fields§
§reflector_: Reflector
§current_target: MutNullableDom<EventTarget>
§target: MutNullableDom<EventTarget>
§type_: DomRefCell<Atom>
§phase: Cell<EventPhase>
§canceled: Cell<EventDefault>
§stop_propagation: Cell<bool>
§stop_immediate: Cell<bool>
§cancelable: Cell<bool>
§bubbles: Cell<bool>
§trusted: Cell<bool>
§dispatching: Cell<bool>
§initialized: Cell<bool>
§time_stamp: CrossProcessInstant
Implementations§
source§impl Event
impl Event
fn __assert_parent_type(&self)
source§impl Event
impl Event
pub fn new_inherited() -> Event
pub fn new_uninitialized( global: &GlobalScope, can_gc: CanGc, ) -> Root<Dom<Event>>
pub fn new_uninitialized_with_proto( global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Root<Dom<Event>>
pub fn new( global: &GlobalScope, type_: Atom, bubbles: EventBubbles, cancelable: EventCancelable, can_gc: CanGc, ) -> Root<Dom<Event>>
fn new_with_proto( global: &GlobalScope, proto: Option<HandleObject<'_>>, type_: Atom, bubbles: EventBubbles, cancelable: EventCancelable, can_gc: CanGc, ) -> Root<Dom<Event>>
pub fn init_event(&self, type_: Atom, bubbles: bool, cancelable: bool)
pub fn set_target(&self, target_: Option<&EventTarget>)
sourcefn construct_event_path(
&self,
target: &EventTarget,
) -> Vec<Root<Dom<EventTarget>>>
fn construct_event_path( &self, target: &EventTarget, ) -> Vec<Root<Dom<EventTarget>>>
sourcepub fn dispatch(
&self,
target: &EventTarget,
legacy_target_override: bool,
can_gc: CanGc,
) -> EventStatus
pub fn dispatch( &self, target: &EventTarget, legacy_target_override: bool, can_gc: CanGc, ) -> EventStatus
pub fn status(&self) -> EventStatus
pub fn dispatching(&self) -> bool
pub fn initialized(&self) -> bool
pub fn type_(&self) -> Atom
pub fn mark_as_handled(&self)
pub fn get_cancel_state(&self) -> EventDefault
pub fn set_trusted(&self, trusted: bool)
sourcepub fn fire(&self, target: &EventTarget, can_gc: CanGc) -> EventStatus
pub fn fire(&self, target: &EventTarget, can_gc: CanGc) -> EventStatus
Trait Implementations§
source§impl Castable for Event
impl Castable for Event
source§impl DomObjectWrap for Event
impl DomObjectWrap for Event
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::EventBinding::Event_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::event::Event>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::event::Event>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::EventBinding::Event_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::event::Event>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::event::Event>>}
Function pointer to the general wrap function type
source§impl EventMethods<DomTypeHolder> for Event
impl EventMethods<DomTypeHolder> for Event
source§fn Constructor(
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
type_: DOMString,
init: &EventInit,
) -> Result<Root<Dom<Event>>, Error>
fn Constructor( global: &GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, type_: DOMString, init: &EventInit, ) -> Result<Root<Dom<Event>>, Error>
source§fn GetSrcElement(&self) -> Option<Root<Dom<EventTarget>>>
fn GetSrcElement(&self) -> Option<Root<Dom<EventTarget>>>
source§fn GetCurrentTarget(&self) -> Option<Root<Dom<EventTarget>>>
fn GetCurrentTarget(&self) -> Option<Root<Dom<EventTarget>>>
source§fn ComposedPath(&self) -> Vec<Root<Dom<EventTarget>>>
fn ComposedPath(&self) -> Vec<Root<Dom<EventTarget>>>
source§fn StopImmediatePropagation(&self)
fn StopImmediatePropagation(&self)
source§impl IDLInterface for Event
impl IDLInterface for Event
source§impl MallocSizeOf for Event
impl MallocSizeOf for Event
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl MutDomObject for Event
impl MutDomObject for Event
source§impl ToJSValConvertible for Event
impl ToJSValConvertible for Event
impl DerivedFrom<Event> for AnimationEvent
impl DerivedFrom<Event> for BeforeUnloadEvent
impl DerivedFrom<Event> for BluetoothAdvertisingEvent
impl DerivedFrom<Event> for CloseEvent
impl DerivedFrom<Event> for CompositionEvent
impl DerivedFrom<Event> for CustomEvent
impl DerivedFrom<Event> for ErrorEvent
impl DerivedFrom<Event> for Event
impl DerivedFrom<Event> for ExtendableEvent
impl DerivedFrom<Event> for ExtendableMessageEvent
impl DerivedFrom<Event> for FocusEvent
impl DerivedFrom<Event> for FormDataEvent
impl DerivedFrom<Event> for GPUUncapturedErrorEvent
impl DerivedFrom<Event> for GamepadEvent
impl DerivedFrom<Event> for HashChangeEvent
impl DerivedFrom<Event> for InputEvent
impl DerivedFrom<Event> for KeyboardEvent
impl DerivedFrom<Event> for MediaQueryListEvent
impl DerivedFrom<Event> for MessageEvent
impl DerivedFrom<Event> for MouseEvent
impl DerivedFrom<Event> for OfflineAudioCompletionEvent
impl DerivedFrom<Event> for PageTransitionEvent
impl DerivedFrom<Event> for PointerEvent
impl DerivedFrom<Event> for PopStateEvent
impl DerivedFrom<Event> for ProgressEvent
impl DerivedFrom<Event> for PromiseRejectionEvent
impl DerivedFrom<Event> for RTCDataChannelEvent
impl DerivedFrom<Event> for RTCErrorEvent
impl DerivedFrom<Event> for RTCPeerConnectionIceEvent
impl DerivedFrom<Event> for RTCTrackEvent
impl DerivedFrom<Event> for SecurityPolicyViolationEvent
impl DerivedFrom<Event> for StorageEvent
impl DerivedFrom<Event> for SubmitEvent
impl DerivedFrom<Event> for TouchEvent
impl DerivedFrom<Event> for TrackEvent
impl DerivedFrom<Event> for TransitionEvent
impl DerivedFrom<Event> for UIEvent
impl DerivedFrom<Event> for WebGLContextEvent
impl DerivedFrom<Event> for WheelEvent
impl DerivedFrom<Event> for XRInputSourceEvent
impl DerivedFrom<Event> for XRInputSourcesChangeEvent
impl DerivedFrom<Event> for XRLayerEvent
impl DerivedFrom<Event> for XRReferenceSpaceEvent
impl DerivedFrom<Event> for XRSessionEvent
impl Eq for Event
Auto Trait Implementations§
impl !Freeze for Event
impl !RefUnwindSafe for Event
impl !Send for Event
impl !Sync for Event
impl Unpin for Event
impl !UnwindSafe for Event
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert