main.js 389 B

123456789101112
  1. import { dotnet } from './_framework/dotnet.js'
  2. const is_browser = typeof window != "undefined";
  3. if (!is_browser) throw new Error(`Expected to be running in a browser`);
  4. const dotnetRuntime = await dotnet
  5. .withApplicationArgumentsFromQuery()
  6. .create();
  7. const config = dotnetRuntime.getConfig();
  8. await dotnetRuntime.runMain(config.mainAssemblyName, [globalThis.location.href]);