DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/NativeHost/
Reload.rs1#![allow(non_snake_case)]
2
3use serde_json::Value;
8use tauri::{AppHandle, Manager};
9
10use crate::dev_log;
11
12pub async fn Reload(ApplicationHandle:AppHandle, _Arguments:Vec<Value>) -> Result<Value, String> {
13 dev_log!("lifecycle", "nativeHost:reload - reloading webview");
14
15 if let Some(Window) = ApplicationHandle.get_webview_window("main") {
16 Window
17 .eval("location.reload()")
18 .map_err(|E| format!("reload eval failed: {E}"))?;
19 }
20
21 Ok(Value::Null)
22}