Ajout des orateurices au clavier

This commit is contained in:
2020-10-08 00:27:30 +02:00
parent cdc350f260
commit 24d42c1401
3 changed files with 14 additions and 3 deletions

View File

@@ -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");