-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentscost: SWill take up to 2 days to completeWill take up to 2 days to completefeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssemblytask
Milestone
Description
aspnetcore/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts
Lines 201 to 215 in 5750125
// Due to a strange behavior in macOS Catalina, we have to delay loading the WebAssembly files | |
// until after it finishes evaluating a <script> element that assigns a value to window.Module. | |
// This may be fixed in a later version of macOS/iOS, or even if not it may be possible to reduce | |
// this to a smaller workaround. | |
function addGlobalModuleScriptTagsToDocument(callback: () => void) { | |
const scriptElem = document.createElement('script'); | |
// This pollutes global but is needed so it can be called from the script. | |
// The callback is put in the global scope so that it can be run after the script is loaded. | |
// onload cannot be used in this case for non-file scripts. | |
window['__wasmmodulecallback__'] = callback; | |
scriptElem.text = 'var Module; window.__wasmmodulecallback__(); delete window.__wasmmodulecallback__;'; | |
document.body.appendChild(scriptElem); | |
} |
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentscost: SWill take up to 2 days to completeWill take up to 2 days to completefeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssemblytask