Skip to content

Commit e17b600

Browse files
authored
fix: add app.run invokation to multiwindow example (tauri-apps#1320)
* fix: add app.run invokation to multiwindow example * weird
1 parent f557f6b commit e17b600

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/guides/features/multiwindow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ tauri::Builder::default()
6262
).build()?;
6363
Ok(())
6464
})
65+
.run(tauri::generate_context!())
66+
.expect("error while running app");
6567
```
6668

6769
Using the setup hook ensures static windows and Tauri plugins are initialized.
@@ -83,6 +85,9 @@ let local_window = tauri::WindowBuilder::new(
8385
"local",
8486
tauri::WindowUrl::App("index.html".into())
8587
).build()?;
88+
89+
// This will start the app and no other code below this will run.
90+
app.run(|_, _| {});
8691
```
8792

8893
This method is useful when you cannot move ownership of values to the setup closure.

0 commit comments

Comments
 (0)