You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is guaranteed that code is executed before window.onload.
I considered just adding a docstring to withGlobalTauri mentioning the fact that you have to wait for onload to finish before using it, but then I saw that we have docs on this https://v2.tauri.app/develop/calling-rust/#basic-example, and the docs don't say anything about onload.
Describe the bug
The examples do not work, at least for me on Windows.
Reproduction
git clone https://github.com/tauri-apps/tauri.git && cd tauricargo run --example helloworld2025-03-15-bXIKVfHYnq.mp4
Expected behavior
The "Hello from Rust" message appears
Full
tauri infooutputStack trace
Additional context
If I open dev tools and refresh the window, then it starts working.
Looks like
with_global_tauriutilizeswith_initialization_scripttauri/crates/tauri/src/manager/webview.rs
Lines 377 to 405 in 95fc3cd
tauri/crates/tauri-runtime-wry/src/lib.rs
Line 4532 in cedb24d
But its docs state
I considered just adding a docstring to
withGlobalTaurimentioning the fact that you have to wait foronloadto finish before using it, but then I saw that we have docs on this https://v2.tauri.app/develop/calling-rust/#basic-example, and the docs don't say anything aboutonload.