pub(crate) trait EventMethods<D: DomTypes> {
Show 21 methods
// Required methods
fn Type(&self) -> DOMString;
fn GetTarget(&self) -> Option<DomRoot<D::EventTarget>>;
fn GetSrcElement(&self) -> Option<DomRoot<D::EventTarget>>;
fn GetCurrentTarget(&self) -> Option<DomRoot<D::EventTarget>>;
fn ComposedPath(&self) -> Vec<DomRoot<D::EventTarget>>;
fn EventPhase(&self) -> u16;
fn StopPropagation(&self);
fn CancelBubble(&self) -> bool;
fn SetCancelBubble(&self, value: bool);
fn StopImmediatePropagation(&self);
fn Bubbles(&self) -> bool;
fn Cancelable(&self) -> bool;
fn ReturnValue(&self) -> bool;
fn SetReturnValue(&self, value: bool);
fn PreventDefault(&self);
fn DefaultPrevented(&self) -> bool;
fn Composed(&self) -> bool;
fn IsTrusted(&self) -> bool;
fn TimeStamp(&self) -> Finite<f64>;
fn InitEvent(&self, type_: DOMString, bubbles: bool, cancelable: bool);
fn Constructor(
global: &D::GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
type_: DOMString,
eventInitDict: &EventInit,
) -> Fallible<DomRoot<D::Event>>;
}
Required Methods§
fn Type(&self) -> DOMString
fn GetTarget(&self) -> Option<DomRoot<D::EventTarget>>
fn GetSrcElement(&self) -> Option<DomRoot<D::EventTarget>>
fn GetCurrentTarget(&self) -> Option<DomRoot<D::EventTarget>>
fn ComposedPath(&self) -> Vec<DomRoot<D::EventTarget>>
fn EventPhase(&self) -> u16
fn StopPropagation(&self)
fn CancelBubble(&self) -> bool
fn SetCancelBubble(&self, value: bool)
fn StopImmediatePropagation(&self)
fn Bubbles(&self) -> bool
fn Cancelable(&self) -> bool
fn ReturnValue(&self) -> bool
fn SetReturnValue(&self, value: bool)
fn PreventDefault(&self)
fn DefaultPrevented(&self) -> bool
fn Composed(&self) -> bool
fn IsTrusted(&self) -> bool
fn TimeStamp(&self) -> Finite<f64>
fn InitEvent(&self, type_: DOMString, bubbles: bool, cancelable: bool)
fn Constructor( global: &D::GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, type_: DOMString, eventInitDict: &EventInit, ) -> Fallible<DomRoot<D::Event>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.