fix: update the latest template of Browser project.

This commit is contained in:
Zhang Dian
2024-03-12 17:16:23 +08:00
parent 4b7674d7e2
commit ef272815ea
7 changed files with 11 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
import { dotnet } from './_framework/dotnet.js'
const is_browser = typeof window != "undefined";
if (!is_browser) throw new Error(`Expected to be running in a browser`);
const dotnetRuntime = await dotnet
.withDiagnosticTracing(false)
.withApplicationArgumentsFromQuery()
.create();
const config = dotnetRuntime.getConfig();
await dotnetRuntime.runMain(config.mainAssemblyName, [window.location.search]);