What causes a script tag to be executed in a Blazor Web App?
It appears that when a page in my test app is navigated to with the the URL or refreshed using the browser my “test.js” script runs which adds a “style” element to “head” which changes the background to green. However, if I click on the “Home” link (or “Counter”, or “Weather”) from the left navigation pane, the “style” tag is removed from “head”, which means the “test.js” script did not run.
How do I force the script to re-run each time the page is navigated to using the links on the left?
On app load (or refresh, or nav using a URL):
After navigating to the link “Home” using the left pane navigation: