Skip to content

Conversation

@guardrex
Copy link
Collaborator

@guardrex guardrex commented Nov 18, 2024

Fixes #34126

Thanks @willdean! 🚀 ... Turns out that we had a little coverage on this in the JS overview section, JavaScript interop calls without a circuit. However, this is going to improve how this information is surfaced generally and specifically for JS modules ...

  • That section ☝️ will now use a JS module as its code example.
  • I'm adding that coverage to the JS interop Call JS from .NET article's JavaScript isolation in JavaScript modules section.
  • I went over to the Blazor samples repo and updated all of the JS module code examples to use the try-catch block on Trap JSDisconnectedException on module disposal blazor-samples#396.
  • I've updated all of the article inline module disposal examples to use the try-catch block.
  • I improved the cross-linking of relevant sections.
  • In passing, not really related to this PR's focus, I'm updating how all of the docs refer to the Blazor-SignalR circuit to use standard terminology.

It will be easier for devs to discover this subject and the recommendation to trap JSDisconnectedException. Thanks again! 🍻


Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
aspnetcore/blazor/components/class-libraries-and-static-server-side-rendering.md aspnetcore/blazor/components/class-libraries-and-static-server-side-rendering
aspnetcore/blazor/components/integration.md aspnetcore/blazor/components/integration
aspnetcore/blazor/components/lifecycle.md aspnetcore/blazor/components/lifecycle
aspnetcore/blazor/components/render-modes.md aspnetcore/blazor/components/render-modes
aspnetcore/blazor/fundamentals/signalr.md aspnetcore/blazor/fundamentals/signalr
aspnetcore/blazor/hybrid/static-files.md aspnetcore/blazor/hybrid/static-files
aspnetcore/blazor/javascript-interoperability/call-dotnet-from-javascript.md aspnetcore/blazor/javascript-interoperability/call-dotnet-from-javascript
aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet.md aspnetcore/blazor/javascript-interoperability/call-javascript-from-dotnet
aspnetcore/blazor/javascript-interoperability/index.md aspnetcore/blazor/javascript-interoperability/index
aspnetcore/blazor/javascript-interoperability/location-of-javascript.md aspnetcore/blazor/javascript-interoperability/location-of-javascript
aspnetcore/blazor/security/server/index.md aspnetcore/blazor/security/server/index

@guardrex guardrex self-assigned this Nov 18, 2024
@guardrex guardrex merged commit 27712b9 into main Nov 18, 2024
3 checks passed
@guardrex guardrex deleted the guardrex/blazor-module-dispose-pattern branch November 18, 2024 14:50
@willdean
Copy link

Thanks @guardrex - funny enough I noticed that section later and was going to comment to ask facetiously if "Blazor-With-A-Circuit" was the latest name for Blazor Server!

Thanks for the incredibly fast response. I am much more inclined to file bugs against the docs if there's some prospect of getting fixes through to publication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blazor JS Interop page gives example of Dispose pattern which causes unhandled exceptions.

3 participants