Browse Source

1

liangku_skuoptimazation
shanji 2 years ago
parent
commit
cec3d0ea12
  1. 2
      WebTest/MainWindow.xaml.cs
  2. 2
      WebTest/WebTest.csproj

2
WebTest/MainWindow.xaml.cs

@ -95,7 +95,7 @@ private string registerName = "webContext";
if (args.PermissionKind == CoreWebView2PermissionKind.ClipboardRead)
args.State = CoreWebView2PermissionState.Allow;
};
w2m.wb2.CoreWebView2.AddHostObjectToScript(registerName, this.globalContext);
w2m.wb2.CoreWebView2.AddHostObjectToScript("webContext", this.globalContext);
};
w2m.Init();

2
WebTest/WebTest.csproj

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>

Loading…
Cancel
Save