mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-21 00:47:24 +08:00
feat: upgrade to support wasm.
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
/* HTML styles for the splash screen */
|
||||
:root {
|
||||
--sat: env(safe-area-inset-top);
|
||||
--sar: env(safe-area-inset-right);
|
||||
--sab: env(safe-area-inset-bottom);
|
||||
--sal: env(safe-area-inset-left);
|
||||
}
|
||||
|
||||
/* HTML styles for the splash screen */
|
||||
|
||||
.highlight {
|
||||
color: white;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<link rel="modulepreload" href="./dotnet.js" />
|
||||
<link rel="modulepreload" href="./avalonia.js" />
|
||||
<link rel="stylesheet" href="./app.css" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
</head>
|
||||
|
||||
<body style="margin: 0px; overflow: hidden">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { dotnet } from './dotnet.js'
|
||||
import { registerAvaloniaModule } from './avalonia.js';
|
||||
|
||||
const is_browser = typeof window != "undefined";
|
||||
if (!is_browser) throw new Error(`Expected to be running in a browser`);
|
||||
@@ -9,8 +8,6 @@ const dotnetRuntime = await dotnet
|
||||
.withApplicationArgumentsFromQuery()
|
||||
.create();
|
||||
|
||||
await registerAvaloniaModule(dotnetRuntime);
|
||||
|
||||
const config = dotnetRuntime.getConfig();
|
||||
|
||||
await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]);
|
||||
Reference in New Issue
Block a user