[Hot Reload] Enable hot reloading for Blazor inside an iframe #54416
Labels
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-hot-reload
This issue is related to the Hot Reload feaature
Milestone
Description
Hot Reload on a Blazor app doesn't work inside an iframe. See the attached video and sample code.
2024-02-29_08h08_22.mp4
Sample code: 📦BlazorWasmApp1.zip
The solution I'd like
I know this is intentional by design, as mentioned in the pull request: dotnet/sdk#21954. However, some edge cases exist where hot reloading support inside an iframe is essential. For instance, the clone of Storybook for Blazor, "Blazing Story" (https://github.com/jsakamoto/BlazingStory), requires such ability because it has to host a preview of the story using an iframe.
Therefore, I hope we have a public "escape hatch" API allowing developers to explicitly enable hot reloading inside an iframe for such a particular scenario.
The text was updated successfully, but these errors were encountered: