pub struct EventContext {
pub target: String,
pub current_target: String,
pub phase: EventPhase,
/* private fields */
}Expand description
Event context with propagation control
Fields§
§target: StringTarget element ID
current_target: StringCurrent element ID (for propagation)
phase: EventPhaseEvent phase
Implementations§
Source§impl EventContext
impl EventContext
Sourcepub fn stop_propagation(&self)
pub fn stop_propagation(&self)
Stop event propagation
Sourcepub fn stop_immediate_propagation(&self)
pub fn stop_immediate_propagation(&self)
Stop immediate event propagation (prevents other listeners on same element)
Sourcepub fn prevent_default(&self)
pub fn prevent_default(&self)
Prevent default action
Sourcepub fn is_propagation_stopped(&self) -> bool
pub fn is_propagation_stopped(&self) -> bool
Check if propagation is stopped
Sourcepub fn is_immediate_propagation_stopped(&self) -> bool
pub fn is_immediate_propagation_stopped(&self) -> bool
Check if immediate propagation is stopped
Sourcepub fn is_default_prevented(&self) -> bool
pub fn is_default_prevented(&self) -> bool
Check if default is prevented
Trait Implementations§
Source§impl Clone for EventContext
impl Clone for EventContext
Source§fn clone(&self) -> EventContext
fn clone(&self) -> EventContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EventContext
impl RefUnwindSafe for EventContext
impl Send for EventContext
impl Sync for EventContext
impl Unpin for EventContext
impl UnwindSafe for EventContext
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