This commit is contained in:
vcoppe
2026-10-04 11:07:12 +02:00
parent f458a1104f
commit 9015da4876
13 changed files with 122 additions and 19 deletions
+3 -2
View File
@@ -149,9 +149,10 @@ pub fn new_file(name: &str) -> bool {
edit(Command::New(engine::New { name }))
}
/// `name`: the name of the file when the data has none (the name on disk, without extension).
#[wasm_bindgen]
pub fn load_file(data: &[u8]) -> bool {
edit(Command::Load(engine::Load { data }))
pub fn load_file(data: &[u8], name: &str) -> bool {
edit(Command::Load(engine::Load { data, name }))
}
#[wasm_bindgen]