redraw/dom/events

Event listeners usable in React and in browser.
All of them can be found in the React.dev documentation for detailed information, as well as on MDN.

Every event listener are defined as handlers, accepting an event, detailed in their documentation.

Values

pub const none: fn() -> attribute.Attribute

none will not appear in HTML attributes. Use it for conditional rendering.

pub fn on_abort(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_abort_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_abort that runs during capture phase.
Documentation

pub fn on_animation_end(
  handler: fn(animation.AnimationEvent) -> Nil,
) -> attribute.Attribute
pub fn on_animation_end_capture(
  handler: fn(animation.AnimationEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_animation_end that runs during capture phase.
Documentation

pub fn on_animation_iteration(
  handler: fn(animation.AnimationEvent) -> Nil,
) -> attribute.Attribute
pub fn on_animation_iteration_capture(
  handler: fn(animation.AnimationEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_animation_iteration that runs during capture phase.
Documentation

pub fn on_animation_start(
  handler: fn(animation.AnimationEvent) -> Nil,
) -> attribute.Attribute
pub fn on_animation_start_capture(
  handler: fn(animation.AnimationEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_animation_start that runs during capture phase.
Documentation

pub fn on_aux_click(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_aux_click_capture(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_aux_click that runs during capture phase.
Documentation

pub fn on_before_input(
  handler: fn(input.InputEvent) -> Nil,
) -> attribute.Attribute
pub fn on_before_input_capture(
  handler: fn(input.InputEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_before_input that runs during capture phase.
Documentation

pub fn on_blur(
  handler: fn(focus.FocusEvent) -> Nil,
) -> attribute.Attribute
pub fn on_blur_capture(
  handler: fn(focus.FocusEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_blur that runs during capture phase.
Documentation

pub fn on_can_play(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_can_play_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_can_play that runs during capture phase.
Documentation

pub fn on_can_play_through(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_can_play_through_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_can_play_through that runs during capture phase.
Documentation

pub fn on_cancel(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_cancel_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_cancel that runs during capture phase.
Documentation

pub fn on_change(
  handler: fn(input.InputEvent) -> Nil,
) -> attribute.Attribute
pub fn on_change_capture(
  handler: fn(input.InputEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_change that runs during capture phase.
Documentation

pub fn on_click(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_click_capture(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_click that runs during capture phase.
Documentation

pub fn on_close(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_close_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_close that runs during capture phase.
Documentation

pub fn on_composition_end_capture(
  handler: fn(composition.CompositionEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_composition_end that runs during capture phase.
Documentation

pub fn on_composition_start_capture(
  handler: fn(composition.CompositionEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_composition_start that runs during capture phase.
Documentation

pub fn on_composition_update_capture(
  handler: fn(composition.CompositionEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_composition_update that runs during capture phase.
Documentation

pub fn on_context_menu(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_context_menu_capture(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_context_menu that runs during capture phase.
Documentation

pub fn on_copy_capture(
  handler: fn(clipboard.ClipboardEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_copy that runs during capture phase.
Documentation

pub fn on_cut_capture(
  handler: fn(clipboard.ClipboardEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_cut that runs during capture phase.
Documentation

pub fn on_double_click(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_double_click_capture(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_double_click that runs during capture phase.
Documentation

pub fn on_drag(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute
pub fn on_drag_capture(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_drag that runs during capture phase.
Documentation

pub fn on_drag_end(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute
pub fn on_drag_end_capture(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_drag_end that runs during capture phase.
Documentation

pub fn on_drag_enter(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute
pub fn on_drag_enter_capture(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_drag_enter that runs during capture phase.
Documentation

pub fn on_drag_over(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute
pub fn on_drag_over_capture(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_drag_over that runs during capture phase.
Documentation

pub fn on_drag_start(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute
pub fn on_drag_start_capture(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_drag_start that runs during capture phase.
Documentation

pub fn on_drop(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute
pub fn on_drop_capture(
  handler: fn(drag.DragEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_drop that runs during capture phase.
Documentation

pub fn on_duration_change(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_duration_change_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_duration_change that runs during capture phase.
Documentation

pub fn on_emptied(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_emptied_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_emptied that runs during capture phase.
Documentation

pub fn on_encrypted(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_encrypted_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_encrypted that runs during capture phase.
Documentation

pub fn on_ended(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_ended_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_ended that runs during capture phase.
Documentation

pub fn on_error(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_error_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_error that runs during capture phase.
Documentation

pub fn on_focus(
  handler: fn(focus.FocusEvent) -> Nil,
) -> attribute.Attribute
pub fn on_focus_capture(
  handler: fn(focus.FocusEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_focus that runs during capture phase.
Documentation

pub fn on_got_pointer_capture(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_got_pointer that runs during capture phase.
Documentation

pub fn on_got_pointer_capture_capture(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_got_pointer_capture that runs during capture phase.
Documentation

pub fn on_input(
  handler: fn(input.InputEvent) -> Nil,
) -> attribute.Attribute
pub fn on_input_capture(
  handler: fn(input.InputEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_input that runs during capture phase.
Documentation

pub fn on_key_down(
  handler: fn(keyboard.KeyboardEvent) -> Nil,
) -> attribute.Attribute
pub fn on_key_down_capture(
  handler: fn(keyboard.KeyboardEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_key_down that runs during capture phase.
Documentation

pub fn on_key_press(
  handler: fn(keyboard.KeyboardEvent) -> Nil,
) -> attribute.Attribute
pub fn on_key_press_capture(
  handler: fn(keyboard.KeyboardEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_key_press that runs during capture phase.
Documentation

pub fn on_key_up_capture(
  handler: fn(keyboard.KeyboardEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_key_up that runs during capture phase.
Documentation

pub fn on_load(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_load_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_load that runs during capture phase.
Documentation

pub fn on_load_start(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_load_start_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_load_start that runs during capture phase.
Documentation

pub fn on_loaded_data(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_loaded_data_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_loaded_data that runs during capture phase.
Documentation

pub fn on_loaded_metadata(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_loaded_metadata_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_loaded_metadata that runs during capture phase.
Documentation

pub fn on_lost_pointer_capture(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_lost_pointer that runs during capture phase.
Documentation

pub fn on_lost_pointer_capture_capture(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_lost_pointer_capture that runs during capture phase.
Documentation

pub fn on_mouse_down(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_mouse_down_capture(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_mouse_down that runs during capture phase.
Documentation

pub fn on_mouse_enter(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_mouse_leave(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_mouse_move(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_mouse_move_capture(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_mouse_move that runs during capture phase.
Documentation

pub fn on_mouse_out(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_mouse_out_capture(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_mouse_out that runs during capture phase.
Documentation

pub fn on_mouse_up(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute
pub fn on_mouse_up_capture(
  handler: fn(mouse.MouseEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_mouse_up that runs during capture phase.
Documentation

pub fn on_paste_capture(
  handler: fn(clipboard.ClipboardEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_paste that runs during capture phase.
Documentation

pub fn on_pause(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_pause_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_pause that runs during capture phase.
Documentation

pub fn on_play(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_play_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_play that runs during capture phase.
Documentation

pub fn on_playing(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_playing_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_playing that runs during capture phase.
Documentation

pub fn on_pointer_cancel(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute
pub fn on_pointer_cancel_capture(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_pointer_cancel that runs during capture phase.
Documentation

pub fn on_pointer_down(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute
pub fn on_pointer_down_capture(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_pointer_down that runs during capture phase.
Documentation

pub fn on_pointer_enter(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute
pub fn on_pointer_leave(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute
pub fn on_pointer_move(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute
pub fn on_pointer_move_capture(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_pointer_move that runs during capture phase.
Documentation

pub fn on_pointer_out(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute
pub fn on_pointer_out_capture(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_pointer_out that runs during capture phase.
Documentation

pub fn on_pointer_up(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute
pub fn on_pointer_up_capture(
  handler: fn(pointer.PointerEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_pointer_up that runs during capture phase.
Documentation

pub fn on_progress(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_progress_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_progress that runs during capture phase.
Documentation

pub fn on_rate_change(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_rate_change_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_rate_change that runs during capture phase.
Documentation

pub fn on_reset(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_reset_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_reset that runs during capture phase.
Documentation

pub fn on_resize(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_resize_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_resize that runs during capture phase.
Documentation

pub fn on_scroll(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_scroll_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_scroll that runs during capture phase.
Documentation

pub fn on_seeked(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_seeked_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_seeked that runs during capture phase.
Documentation

pub fn on_seeking(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_seeking_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_seeking that runs during capture phase.
Documentation

pub fn on_select(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_select_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_select that runs during capture phase.
Documentation

pub fn on_stalled(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_stalled_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_stalled that runs during capture phase.
Documentation

pub fn on_submit(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_submit_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_submit that runs during capture phase.
Documentation

pub fn on_suspend(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_suspend_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_suspend that runs during capture phase.
Documentation

pub fn on_time_update(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_time_update_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_time_update that runs during capture phase.
Documentation

pub fn on_toggle(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_toggle_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_toggle that runs during capture phase.
Documentation

pub fn on_touch_cancel(
  handler: fn(touch.TouchEvent) -> Nil,
) -> attribute.Attribute
pub fn on_touch_cancel_capture(
  handler: fn(touch.TouchEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_touch_cancel that runs during capture phase.
Documentation

pub fn on_touch_end(
  handler: fn(touch.TouchEvent) -> Nil,
) -> attribute.Attribute
pub fn on_touch_end_capture(
  handler: fn(touch.TouchEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_touch_end that runs during capture phase.
Documentation

pub fn on_touch_move(
  handler: fn(touch.TouchEvent) -> Nil,
) -> attribute.Attribute
pub fn on_touch_move_capture(
  handler: fn(touch.TouchEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_touch_move that runs during capture phase.
Documentation

pub fn on_touch_start(
  handler: fn(touch.TouchEvent) -> Nil,
) -> attribute.Attribute
pub fn on_touch_start_capture(
  handler: fn(touch.TouchEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_touch_start that runs during capture phase.
Documentation

pub fn on_transition_end_capture(
  handler: fn(transition.TransitionEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_transition_end that runs during capture phase.
Documentation

pub fn on_volume_change(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_volume_change_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_volume_change that runs during capture phase.
Documentation

pub fn on_waiting(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute
pub fn on_waiting_capture(
  handler: fn(event.Event) -> Nil,
) -> attribute.Attribute

Alternative version of on_waiting that runs during capture phase.
Documentation

pub fn on_wheel(
  handler: fn(wheel.WheelEvent) -> Nil,
) -> attribute.Attribute
pub fn on_wheel_capture(
  handler: fn(wheel.WheelEvent) -> Nil,
) -> attribute.Attribute

Alternative version of on_wheel that runs during capture phase.
Documentation

Search Document