Skip to content

Tracking: Event handling #257

Description

@nicoburns

Event handling

Roughly ordered by priority, but if you need something not marked as high-priority then please feel free to request it!

For many events we need to implement both:

  • The ability to handle the event in scripts (e.g. Dioxus Native or a future JavaScript scripting engine)
  • The default event action in case the event is not handled by script (scrolling the page, clicking on a button, typing into a text input, etc).

Performance optimizations

These will be an important part of implementing performance-sensitive events (that can get called at very high frequency) such as scroll, mousemove, mouseenter, mouseleave, mouseover and mouseout, etc):

  • Avoid process event if there are no events of that type in the entire vdom
  • Avoid sending event into vdom if there are no handlers for the target element

High-priority events

Mouse Click

  • onclick
  • onauxclick
  • ondblclick
  • onmousedown
  • onmouseup
  • oncontextmenu

Mouse Move

  • onmousemove
  • "hover" events:
    • onmouseenter
    • onmouseleave
    • onmouseout
    • onmouseover

Scroll/Wheel

  • onwheel
  • onscroll
  • onscrollend

Keyboard

  • onkeydown
  • onkeypress
  • onkeyup

Change / Input

  • onchange
  • oninput
  • onbeforeinput

Touch

  • Gesture recognition on mobile for scrolling on pan
  • ontouchstart
  • ontouchend
  • ontouchmove
  • ontouchcancel

Pointer

  • onpointerdown
  • onpointerup
  • onpointercancel
  • onpointermove
  • onpointerover
  • onpointerout
  • onpointerenter
  • onpointerleave

Form

  • onsubmit
  • onreset
  • onformdata
  • oninvalid

Ui Events

  • onload
  • onunload
  • onerror
  • onabort
  • onselect

Focus

  • onfocus
  • onblur
  • onfocusin
  • onfocusout

Composition

  • oncompositionstart
  • oncompositionupdate
  • oncompositionend

Clipboard

  • oncopy
  • oncut
  • onpaste

Pointer Capture

  • ongotpointercapture
  • onlostpointercapture
  • onpointerrawupdate

Shadowdom

  • onslotchange

Dragndrop

  • ondrag
  • ondragend
  • ondragenter
  • ondragleave
  • ondragover
  • ondragstart
  • ondrop

Find-In-Page

  • onbeforematch

Dialog/Popover

  • ontoggle
  • onbeforetoggle
  • oncancel
  • onclose
  • oncommand

Media

  • oncanplay
  • oncanplaythrough
  • oncuechange
  • ondurationchange
  • onemptied
  • onended
  • onloadeddata
  • onloadedmetadata
  • onloadstart
  • onpause
  • onplay
  • onplaying
  • onseeked
  • onseeking
  • onprogress
  • onstalled
  • onratechange
  • onvolumechange
  • onsuspend
  • ontimeupdate
  • onwaiting

Printing

  • onbeforeprint
  • onafterprint

Canvas

  • oncontextlost
  • oncontextrestored

Navigation/History/Online

  • onhashchange
  • onpopstate
  • onbeforeunload
  • onunload
  • onoffline
  • ononline

Global/Settings

  • onresize
  • onlanguagechange
  • onsecuritypolicyviolation
  • onstorage

Server-Sent Events

  • onmessage
  • onmessageerror

Page Events

  • onpagehide
  • onpagereveal
  • onpageshow
  • onpageswap

Javascript

  • onrejectionhandled
  • onunhandledrejection

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions