Created
October 30, 2018 00:39
-
-
Save rippinrobr/6a51e079070f9afb378d37ee4cb52120 to your computer and use it in GitHub Desktop.
The rust function that is used in the index.js file to handle the clicks on the JS click button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// js_click_event_handler is called by the js code in a more | |
// 'tradiitional event listerner approach. It will popup an | |
// alert dialog and display the click event information | |
#[wasm_bindgen] | |
pub fn js_click_event_handler(evt: web_sys::MouseEvent) { | |
super::alert(&format!("[js handler]\n{:#?}", Click::new(evt))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment