pub struct MouseEvent {
pub event: Event,
pub client_x: f64,
pub client_y: f64,
pub button: i32,
pub detail: i32,
pub alt_key: bool,
pub ctrl_key: bool,
pub meta_key: bool,
pub shift_key: bool,
pub target_key: Option<NodeKey>,
}Expand description
A DOM MouseEvent (and the PointerEvent fields Lexical reads), with
the node the app hit in place of the DOM target.
Fields§
§event: Event§client_x: f64§client_y: f64§detail: i32§alt_key: bool§ctrl_key: bool§meta_key: bool§shift_key: bool§target_key: Option<NodeKey>The key of the node under the pointer, as the app resolves it
(Swift’s targetKey).
Implementations§
Methods from Deref<Target = Event>§
Sourcepub fn prevent_default(&self)
pub fn prevent_default(&self)
preventDefault(): a cancelable event’s default action is not to
happen.
Sourcepub fn default_prevented(&self) -> bool
pub fn default_prevented(&self) -> bool
defaultPrevented.
Sourcepub fn stop_propagation(&self)
pub fn stop_propagation(&self)
stopPropagation().
Sourcepub fn propagation_stopped(&self) -> bool
pub fn propagation_stopped(&self) -> bool
Whether stopPropagation() was called.
Trait Implementations§
Source§impl Debug for MouseEvent
impl Debug for MouseEvent
Source§impl Deref for MouseEvent
impl Deref for MouseEvent
Auto Trait Implementations§
impl !Freeze for MouseEvent
impl !RefUnwindSafe for MouseEvent
impl !Sync for MouseEvent
impl Forget for MouseEvent
impl Move for MouseEvent
impl Send for MouseEvent
impl Unpin for MouseEvent
impl UnsafeUnpin for MouseEvent
impl UnwindSafe for MouseEvent
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