Detect if a https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.MouseEvent.html is MouseMove/Up/Down?

Given a MouseEvent, can we figure out if it is MouseMove, MouseUp, MouseDown ? Or do we have to register 3 separate closures in web_sys, one for move, one for up, one for down.

The type property will be set to "mouseup", "mousedown", etc.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.