let devices be removed

This commit is contained in:
Rachel Powers
2024-04-17 19:22:43 -07:00
parent 651a4ad067
commit c4a11bf696
5 changed files with 140 additions and 18 deletions

View File

@@ -465,6 +465,11 @@ impl VM {
pub fn change_device_id(&self, old_id: u32, new_id: u32) -> Result<(), JsError> {
Ok(self.vm.borrow_mut().change_device_id(old_id, new_id)?)
}
#[wasm_bindgen(js_name = "removeDevice")]
pub fn remove_device(&self, id: u32) -> Result<(), JsError> {
Ok(self.vm.borrow_mut().remove_device(id)?)
}
}
impl Default for VM {