Skip to content

Conversation

@hakenr
Copy link
Member

@hakenr hakenr commented Jan 18, 2025

I think this isn’t about interactive vs. static rendering, but rather depends on whether the page instance is preserved in browser. If the DOM is being patched (interactive or static with enhanced navigation), the instance is retained. However, if a new page instance is created (static SSR without enhanced navigation), it behaves differently.


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/javascript-interoperability/location-of-javascript.md aspnetcore/blazor/javascript-interoperability/location-of-javascript

@hakenr hakenr requested a review from guardrex as a code owner January 18, 2025 00:27
@guardrex guardrex self-assigned this Jan 18, 2025
@guardrex
Copy link
Collaborator

Thanks, @hakenr ... This came from Sanderson earlier this week, and he didn't mention the additional qualifier in discussion. Let's get past the MLK holiday weekend, and I'll message him to take a look next week.

The qualifier that's changing for the "removes the <script> tag from the rendered <head> content but doesn't unload the script's JavaScript code" remark is ...

- a Blazor Web App using an interactive render mode (interactive SSR, CSR)
+ a Blazor Web App using either an interactive render mode (interactive SSR, CSR) or static SSR with enhanced navigation

Copy link
Collaborator

@guardrex guardrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good morning, @hakenr! 🌞 No need to ping Steve ... I just reproduced the behavior locally. Thanks for adding this important point that we missed.

@guardrex guardrex merged commit 882bd52 into dotnet:main Jan 21, 2025
3 checks passed
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.

2 participants