mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-11 15:07:08 +00:00
remove panics from desktop docs
`WebView::evaluate_script()` always returns `Ok()`
This commit is contained in:
parent
5e475fadd9
commit
c194fa8372
1 changed files with 1 additions and 7 deletions
|
@ -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<S: std::string::ToString>(cx: &ScopeState) -> impl Fn(S) + '_ {
|
||||
let desktop = use_window(&cx);
|
||||
|
||||
|
|
Loading…
Reference in a new issue