diff --git a/packages/desktop/src/desktop_context.rs b/packages/desktop/src/desktop_context.rs index 5a2d50f31..4475fe978 100644 --- a/packages/desktop/src/desktop_context.rs +++ b/packages/desktop/src/desktop_context.rs @@ -195,17 +195,11 @@ pub(super) fn handler( Eval(code) => webview .evaluate_script(code.as_str()) - .expect("failed to eval script"), + .expect("eval shouldn't panic"), } } /// Get a closure that executes any JavaScript in the WebView context. -/// -/// # Panics -/// -/// The closure will cause the message processing thread to panic if the -/// provided script is not valid JavaScript code or if it returns an uncaught -/// error. pub fn use_eval(cx: &ScopeState) -> impl Fn(S) + '_ { let desktop = use_window(&cx);