@@ -33,7 +33,7 @@ namespace Uno.WebAssembly.Bootstrap {
33
33
34
34
// Take the place of the internal .NET for WebAssembly APIs for metadata updates coming
35
35
// from the "BrowserLink" feature.
36
- const bootstrapContext = this . _context ;
36
+ const browserToolsVariable = ( < any > this . _context ) . config . environmentVariables [ 'ASPNETCORE-BROWSER-TOOLS' ] ;
37
37
38
38
( function ( Blazor ) {
39
39
Blazor . _internal = {
@@ -45,21 +45,11 @@ namespace Uno.WebAssembly.Bootstrap {
45
45
46
46
applyExisting : async function ( ) : Promise < void > {
47
47
48
- var hotreloadConfigResponse = await fetch ( `/_framework/unohotreload` ) ;
49
-
50
- var modifiableAssemblies = hotreloadConfigResponse . headers . get ( 'DOTNET-MODIFIABLE-ASSEMBLIES' ) ;
51
- var aspnetCoreBrowserTools = hotreloadConfigResponse . headers . get ( 'ASPNETCORE-BROWSER-TOOLS' ) ;
52
-
53
- if ( modifiableAssemblies ) {
54
- bootstrapContext . MONO . mono_wasm_setenv ( 'DOTNET_MODIFIABLE_ASSEMBLIES' , modifiableAssemblies ) ;
55
- }
56
-
57
- // To uncomment once https://github.com/dotnet/aspnetcore/issues/37357#issuecomment-941237000 is released
58
- // if (aspnetCoreBrowserTools == "true")
48
+ if ( browserToolsVariable == "true" )
59
49
{
60
50
try {
61
51
var m = < any > await import ( `/_framework/blazor-hotreload.js` ) ;
62
- m . receiveHotReload ( ) ;
52
+ await m . receiveHotReloadAsync ( ) ;
63
53
}
64
54
catch ( e ) {
65
55
console . error ( `Failed to apply initial metadata delta ${ e } ` ) ;
@@ -80,7 +70,7 @@ namespace Uno.WebAssembly.Bootstrap {
80
70
} ) ( ( < any > window ) . Blazor || ( ( < any > window ) . Blazor = { } ) ) ;
81
71
82
72
// Apply pending updates caused by a browser refresh
83
- ( < any > window ) . Blazor . _internal . initialize ( bootstrapContext . BINDING ) ;
73
+ ( < any > window ) . Blazor . _internal . initialize ( ) ;
84
74
await ( < any > window ) . Blazor . _internal . applyExisting ( ) ;
85
75
}
86
76
}
0 commit comments