Skip to content

Commit d32da89

Browse files
committed
[Mac] Fix loading local resources on Webview
1 parent 91a4744 commit d32da89

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Eto.Mac/Forms/Controls/WKWebViewHandler.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,10 @@ public async Task<string> ExecuteScriptAsync(string script)
290290

291291
public void LoadHtml(string html, Uri baseUri)
292292
{
293-
Control.LoadHtmlString(html, baseUri.ToNS());
293+
var baseNSUrl = baseUri.ToNS();
294+
if (baseNSUrl != null)
295+
Control.LoadFileUrl(baseNSUrl, baseNSUrl);
296+
Control.LoadHtmlString(html, baseNSUrl);
294297
}
295298

296299
public void Stop() => Control.StopLoading();

0 commit comments

Comments
 (0)