Skip to content

Commit 7ce11b1

Browse files
committed
Fix WebView (dotnet#515)
1 parent a65f342 commit 7ce11b1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/BlazorWebView/src/Maui/Tizen/BlazorWebViewHandler.Tizen.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ protected override NWebView CreatePlatformView()
6161
/// <inheritdoc />
6262
protected override void ConnectHandler(NWebView platformView)
6363
{
64-
PlatformView.PageLoadFinished += OnLoadFinished;
65-
PlatformView.Context.RegisterHttpRequestInterceptedCallback(OnRequestInterceptCallback);
66-
PlatformView.AddJavaScriptMessageHandler("BlazorHandler", PostMessageFromJS);
64+
platformView.PageLoadFinished += OnLoadFinished;
65+
platformView.Context.RegisterHttpRequestInterceptedCallback(OnRequestInterceptCallback);
66+
platformView.AddJavaScriptMessageHandler("BlazorHandler", PostMessageFromJS);
6767
}
6868

6969
/// <inheritdoc />
7070
protected override void DisconnectHandler(NWebView platformView)
7171
{
72-
PlatformView.PageLoadFinished -= OnLoadFinished;
72+
platformView.PageLoadFinished -= OnLoadFinished;
7373
base.DisconnectHandler(platformView);
7474
}
7575

src/Core/src/Platform/Tizen/MauiWebView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ public MauiWebView()
1313

1414
void IWebViewDelegate.LoadHtml(string? html, string? baseUrl)
1515
{
16-
if (baseUrl == null)
16+
if (baseUrl != null)
1717
{
18-
LoadContents(html, (uint)(html?.Length ?? 0), null, null, baseUrl);
18+
LoadContents(html, (uint)(html?.Length ?? 0), "text/html", "UTF-8", baseUrl);
1919
}
2020
else
2121
{

0 commit comments

Comments
 (0)