Ajout des orateurices au clavier
This commit is contained in:
@@ -45,6 +45,13 @@ pub fn next() {
|
||||
}
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn ajoute_kp(ev: web_sys::KeyboardEvent, id: &str) {
|
||||
if ev.key_code() == 13 {
|
||||
ajoute(id)
|
||||
}
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn ajoute(id: &str) {
|
||||
let window = web_sys::window().expect("no global `window` exists");
|
||||
|
||||
Reference in New Issue
Block a user