Skip to content

Commit

Permalink
fix: fix incorrect example for WebviewBuilder::from_config (#12695)
Browse files Browse the repository at this point in the history
  • Loading branch information
egegungordu authored Feb 12, 2025
1 parent 8e9339e commit 741e44b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/tauri/src/webview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,10 @@ async fn create_window(app: tauri::AppHandle) {
doc = r####"
```
#[tauri::command]
async fn reopen_window(app: tauri::AppHandle) {
let window = tauri::window::WindowBuilder::from_config(&app, &app.config().app.windows.get(0).unwrap().clone())
.unwrap()
.build()
.unwrap();
async fn create_window(app: tauri::AppHandle) {
let window = tauri::window::WindowBuilder::new(&app, "label").build().unwrap();
let webview_builder = tauri::webview::WebviewBuilder::from_config(&app.config().app.windows.get(0).unwrap().clone());
window.add_child(webview_builder, tauri::LogicalPosition::new(0, 0), window.inner_size().unwrap());
}
```
"####
Expand Down

0 comments on commit 741e44b

Please sign in to comment.