#[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>,
precise_time_ns: u64,
}
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>
§precise_time_ns: u64
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) -> Root<Dom<Event>>
pub fn new_uninitialized_with_proto(
global: &GlobalScope,
proto: Option<HandleObject<'_>>
) -> Root<Dom<Event>>
pub fn new(
global: &GlobalScope,
type_: Atom,
bubbles: EventBubbles,
cancelable: EventCancelable
) -> Root<Dom<Event>>
fn new_with_proto(
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
type_: Atom,
bubbles: EventBubbles,
cancelable: EventCancelable
) -> Root<Dom<Event>>
pub fn Constructor(
global: &GlobalScope,
proto: Option<HandleObject<'_>>,
type_: DOMString,
init: &EventInit
) -> Result<Root<Dom<Event>>, Error>
pub fn init_event(&self, type_: Atom, bubbles: bool, cancelable: bool)
pub fn has_listeners_for(&self, target: &EventTarget, type_: &Atom) -> bool
fn construct_event_path(
&self,
target: &EventTarget
) -> Vec<Root<Dom<EventTarget>>> ⓘ
pub fn dispatch(
&self,
target: &EventTarget,
legacy_target_override: bool
) -> 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)
pub fn fire(&self, target: &EventTarget) -> 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>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::EventBinding::EventBinding::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>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::event::Event>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::EventBinding::EventBinding::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>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::event::Event>>}
Function pointer to the general wrap function type
source§impl EventMethods for Event
impl EventMethods for Event
fn EventPhase(&self) -> u16
fn Type(&self) -> DOMString
fn GetTarget(&self) -> Option<Root<Dom<EventTarget>>>
fn GetSrcElement(&self) -> Option<Root<Dom<EventTarget>>>
fn GetCurrentTarget(&self) -> Option<Root<Dom<EventTarget>>>
fn DefaultPrevented(&self) -> bool
fn PreventDefault(&self)
fn StopPropagation(&self)
fn StopImmediatePropagation(&self)
fn Bubbles(&self) -> bool
fn Cancelable(&self) -> bool
fn ReturnValue(&self) -> bool
fn SetReturnValue(&self, val: bool)
fn CancelBubble(&self) -> bool
fn SetCancelBubble(&self, value: bool)
fn TimeStamp(&self) -> Finite<f64>
fn InitEvent(&self, type_: DOMString, bubbles: bool, cancelable: bool)
fn IsTrusted(&self) -> bool
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§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
source§impl PartialEq<Event> for Event
impl PartialEq<Event> 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 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 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 XRSessionEvent
Auto Trait Implementations§
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> 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> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
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