lustre/event
To read the full documentation for this module, please visit https://lustre.build/api/lustre/event
Functions
pub fn mouse_position(
event: Dynamic,
) -> Result(#(Float, Float), List(DecodeError))
pub fn on_keydown(msg: fn(String) -> a) -> Attribute(a)
Listens for key dow events on an element, and dispatches a message with the current key being pressed.
pub fn on_keypress(msg: fn(String) -> a) -> Attribute(a)
Listens for key presses on an element, and dispatches a message with the current key being pressed.
pub fn on_keyup(msg: fn(String) -> a) -> Attribute(a)
Listens for key up events on an element, and dispatches a message with the current key being released.
pub fn on_mouse_down(msg: a) -> Attribute(a)
pub fn on_mouse_enter(msg: a) -> Attribute(a)
pub fn on_mouse_leave(msg: a) -> Attribute(a)
pub fn on_mouse_out(msg: a) -> Attribute(a)
pub fn on_mouse_over(msg: a) -> Attribute(a)
pub fn on_mouse_up(msg: a) -> Attribute(a)
pub fn prevent_default(_event: Dynamic) -> Nil
pub fn stop_propagation(_event: Dynamic) -> Nil