Skip to content

Commit

Permalink
Fix errors on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Wu Yu Wei committed Mar 16, 2022
1 parent b03231f commit eff4a6b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/webview/webview2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ window.addEventListener('mousemove', (e) => window.chrome.webview.postMessage('_

if let Some(nav_callback) = attributes.navigation_handler {
unsafe {
let nav_starting_callback = nav_callback.clone();
webview
.NavigationStarting(
NavigationStartingEventHandler::create(Box::new(move |_, args| {
Expand All @@ -310,7 +309,7 @@ window.addEventListener('mousemove', (e) => window.chrome.webview.postMessage('_
args.Uri(&mut uri)?;
let uri = take_pwstr(uri);

let allow = nav_starting_callback(uri);
let allow = nav_callback(uri);

args.SetCancel(!allow)?;
}
Expand Down

0 comments on commit eff4a6b

Please sign in to comment.