Struct web_sys::MouseEvent
source · #[repr(transparent)]pub struct MouseEvent { /* private fields */ }
Expand description
The MouseEvent
object
This API requires the following crate features to be activated: MouseEvent
Implementations§
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
sourcepub fn new_with_mouse_event_init_dict(
type_arg: &str,
mouse_event_init_dict: &MouseEventInit
) -> Result<MouseEvent, JsValue>
pub fn new_with_mouse_event_init_dict(
type_arg: &str,
mouse_event_init_dict: &MouseEventInit
) -> Result<MouseEvent, JsValue>
The new MouseEvent(..)
constructor, creating a new instance of MouseEvent
This API requires the following crate features to be activated: MouseEvent
, MouseEventInit
source§impl MouseEvent
impl MouseEvent
sourcepub fn get_modifier_state(&self, key_arg: &str) -> bool
pub fn get_modifier_state(&self, key_arg: &str) -> bool
The getModifierState()
method
This API requires the following crate features to be activated: MouseEvent
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event(&self, type_arg: &str)
pub fn init_mouse_event(&self, type_arg: &str)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg(
&self,
type_arg: &str,
can_bubble_arg: bool
)
pub fn init_mouse_event_with_can_bubble_arg(
&self,
type_arg: &str,
can_bubble_arg: bool
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg_and_ctrl_key_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32,
ctrl_key_arg: bool
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg_and_ctrl_key_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32,
ctrl_key_arg: bool
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg_and_ctrl_key_arg_and_alt_key_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32,
ctrl_key_arg: bool,
alt_key_arg: bool
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg_and_ctrl_key_arg_and_alt_key_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32,
ctrl_key_arg: bool,
alt_key_arg: bool
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg_and_ctrl_key_arg_and_alt_key_arg_and_shift_key_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32,
ctrl_key_arg: bool,
alt_key_arg: bool,
shift_key_arg: bool
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg_and_ctrl_key_arg_and_alt_key_arg_and_shift_key_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32,
ctrl_key_arg: bool,
alt_key_arg: bool,
shift_key_arg: bool
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
sourcepub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg_and_ctrl_key_arg_and_alt_key_arg_and_shift_key_arg_and_meta_key_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32,
ctrl_key_arg: bool,
alt_key_arg: bool,
shift_key_arg: bool,
meta_key_arg: bool
)
pub fn init_mouse_event_with_can_bubble_arg_and_cancelable_arg_and_view_arg_and_detail_arg_and_screen_x_arg_and_screen_y_arg_and_client_x_arg_and_client_y_arg_and_ctrl_key_arg_and_alt_key_arg_and_shift_key_arg_and_meta_key_arg(
&self,
type_arg: &str,
can_bubble_arg: bool,
cancelable_arg: bool,
view_arg: Option<&Window>,
detail_arg: i32,
screen_x_arg: i32,
screen_y_arg: i32,
client_x_arg: i32,
client_y_arg: i32,
ctrl_key_arg: bool,
alt_key_arg: bool,
shift_key_arg: bool,
meta_key_arg: bool
)
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
The initMouseEvent()
method
This API requires the following crate features to be activated: MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
The initMouseEvent()
method
This API requires the following crate features to be activated: EventTarget
, MouseEvent
, Window
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
The button
getter
This API requires the following crate features to be activated: MouseEvent
source§impl MouseEvent
impl MouseEvent
The buttons
getter
This API requires the following crate features to be activated: MouseEvent
source§impl MouseEvent
impl MouseEvent
The relatedTarget
getter
This API requires the following crate features to be activated: EventTarget
, MouseEvent
source§impl MouseEvent
impl MouseEvent
source§impl MouseEvent
impl MouseEvent
sourcepub fn movement_x(&self) -> i32
pub fn movement_x(&self) -> i32
The movementX
getter
This API requires the following crate features to be activated: MouseEvent
source§impl MouseEvent
impl MouseEvent
sourcepub fn movement_y(&self) -> i32
pub fn movement_y(&self) -> i32
The movementY
getter
This API requires the following crate features to be activated: MouseEvent
Trait Implementations§
source§impl AsRef<Event> for MouseEvent
impl AsRef<Event> for MouseEvent
source§impl AsRef<JsValue> for MouseEvent
impl AsRef<JsValue> for MouseEvent
source§impl AsRef<MouseEvent> for DragEvent
impl AsRef<MouseEvent> for DragEvent
source§fn as_ref(&self) -> &MouseEvent
fn as_ref(&self) -> &MouseEvent
source§impl AsRef<MouseEvent> for MouseScrollEvent
impl AsRef<MouseEvent> for MouseScrollEvent
source§fn as_ref(&self) -> &MouseEvent
fn as_ref(&self) -> &MouseEvent
source§impl AsRef<MouseEvent> for PointerEvent
impl AsRef<MouseEvent> for PointerEvent
source§fn as_ref(&self) -> &MouseEvent
fn as_ref(&self) -> &MouseEvent
source§impl AsRef<MouseEvent> for WheelEvent
impl AsRef<MouseEvent> for WheelEvent
source§fn as_ref(&self) -> &MouseEvent
fn as_ref(&self) -> &MouseEvent
source§impl AsRef<Object> for MouseEvent
impl AsRef<Object> for MouseEvent
source§impl AsRef<UiEvent> for MouseEvent
impl AsRef<UiEvent> for MouseEvent
source§impl Clone for MouseEvent
impl Clone for MouseEvent
source§fn clone(&self) -> MouseEvent
fn clone(&self) -> MouseEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MouseEvent
impl Debug for MouseEvent
source§impl From<DragEvent> for MouseEvent
impl From<DragEvent> for MouseEvent
source§fn from(obj: DragEvent) -> MouseEvent
fn from(obj: DragEvent) -> MouseEvent
source§impl From<JsValue> for MouseEvent
impl From<JsValue> for MouseEvent
source§fn from(obj: JsValue) -> MouseEvent
fn from(obj: JsValue) -> MouseEvent
source§impl From<MouseEvent> for Event
impl From<MouseEvent> for Event
source§fn from(obj: MouseEvent) -> Event
fn from(obj: MouseEvent) -> Event
source§impl From<MouseEvent> for JsValue
impl From<MouseEvent> for JsValue
source§fn from(obj: MouseEvent) -> JsValue
fn from(obj: MouseEvent) -> JsValue
source§impl From<MouseEvent> for Object
impl From<MouseEvent> for Object
source§fn from(obj: MouseEvent) -> Object
fn from(obj: MouseEvent) -> Object
source§impl From<MouseEvent> for UiEvent
impl From<MouseEvent> for UiEvent
source§fn from(obj: MouseEvent) -> UiEvent
fn from(obj: MouseEvent) -> UiEvent
source§impl From<MouseScrollEvent> for MouseEvent
impl From<MouseScrollEvent> for MouseEvent
source§fn from(obj: MouseScrollEvent) -> MouseEvent
fn from(obj: MouseScrollEvent) -> MouseEvent
source§impl From<PointerEvent> for MouseEvent
impl From<PointerEvent> for MouseEvent
source§fn from(obj: PointerEvent) -> MouseEvent
fn from(obj: PointerEvent) -> MouseEvent
source§impl From<WheelEvent> for MouseEvent
impl From<WheelEvent> for MouseEvent
source§fn from(obj: WheelEvent) -> MouseEvent
fn from(obj: WheelEvent) -> MouseEvent
source§impl FromWasmAbi for MouseEvent
impl FromWasmAbi for MouseEvent
source§impl<'a> IntoWasmAbi for &'a MouseEvent
impl<'a> IntoWasmAbi for &'a MouseEvent
source§impl IntoWasmAbi for MouseEvent
impl IntoWasmAbi for MouseEvent
source§impl JsCast for MouseEvent
impl JsCast for MouseEvent
source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
T
. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
T
. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
T
. Read moresource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
source§impl OptionFromWasmAbi for MouseEvent
impl OptionFromWasmAbi for MouseEvent
source§impl<'a> OptionIntoWasmAbi for &'a MouseEvent
impl<'a> OptionIntoWasmAbi for &'a MouseEvent
source§impl OptionIntoWasmAbi for MouseEvent
impl OptionIntoWasmAbi for MouseEvent
source§impl RefFromWasmAbi for MouseEvent
impl RefFromWasmAbi for MouseEvent
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<MouseEvent>
type Anchor = ManuallyDrop<MouseEvent>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read moreAuto Trait Implementations§
impl RefUnwindSafe for MouseEvent
impl Send for MouseEvent
impl Sync for MouseEvent
impl Unpin for MouseEvent
impl UnwindSafe for MouseEvent
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more