Skip to content

Commit 3dfe9cd

Browse files
committed
🐛 Build
1 parent 0d90a01 commit 3dfe9cd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Avalonia.WebView2/Controls/WebView2.NativeControlHost.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static unsafe Handler CreateViewHandler(WebView2 wv2)
2727
}
2828
else
2929
{
30-
return = createViewHandler(wv2);
30+
return createViewHandler(wv2);
3131
}
3232
}
3333

@@ -55,9 +55,6 @@ internal Handler(WebView2 webView2)
5555
protected override IPlatformHandle CreateNativeControlCore(IPlatformHandle parent)
5656
{
5757
#if ANDROID
58-
var parentContext = GetContext(parent);
59-
var view = CreatePlatformView(parentContext);
60-
wv2.SetValue(view);
6158
return this;
6259
#elif IOS || MACCATALYST || (MACOS && !USE_DEPRECATED_WEBVIEW)
6360
var view = CreatePlatformView();

src/Avalonia.WebView2/Controls/WebView2.VisualTree.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
7373
if (viewHandler == null)
7474
{
7575
viewHandler = CreateViewHandler(this);
76+
var view = viewHandler.CreatePlatformView();
77+
SetValue(view);
7678
Child = viewHandler;
7779
}
7880
#elif IOS || MACCATALYST || (MACOS && !USE_DEPRECATED_WEBVIEW)

0 commit comments

Comments
 (0)