mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
Fix exception from SVG WebView2
This commit is contained in:
@@ -44,12 +44,12 @@ public class SvgImagePanel : WebpagePanel
|
||||
set
|
||||
{
|
||||
_objectForScripting = value;
|
||||
|
||||
Dispatcher.Invoke(async () =>
|
||||
{
|
||||
await _webView.EnsureCoreWebView2Async();
|
||||
_webView.CoreWebView2.AddHostObjectToScript("external", value);
|
||||
});
|
||||
_webView?.EnsureCoreWebView2Async()
|
||||
.ContinueWith(_ =>
|
||||
_webView?.Dispatcher.Invoke(() =>
|
||||
_webView?.CoreWebView2.AddHostObjectToScript("external", value)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user