diff --git a/.changes/extension_fix.md b/.changes/extension_fix.md new file mode 100644 index 000000000..84a75f9f4 --- /dev/null +++ b/.changes/extension_fix.md @@ -0,0 +1,5 @@ +--- +"wry": "patch" +--- + +Fix extension loading on Windows. \ No newline at end of file diff --git a/src/webview2/mod.rs b/src/webview2/mod.rs index d351c202b..05c79b2c7 100644 --- a/src/webview2/mod.rs +++ b/src/webview2/mod.rs @@ -1252,8 +1252,9 @@ impl InnerWebView { for entry in fs::read_dir(extension_path)? { let path = entry?.path(); let path_hs = HSTRING::from(path.as_path()); + let handler = ProfileAddBrowserExtensionCompletedHandler::create(Box::new(|_, _| Ok(()))); - profile.AddBrowserExtension(&path_hs, None)?; + profile.AddBrowserExtension(&path_hs, &handler)?; } Ok(())