AccountingNext/Schaad.Accounting.UI/wwwroot/js/url.js
Claudio Schaad 651586c4f9 JSON editor: fix switching files and returning to the page (#13)
Co-authored-by: Claudio Schaad <c.schaad@pog.ch>
Co-committed-by: Claudio Schaad <c.schaad@pog.ch>
2026-10-30 21:09:27 +00:00

8 lines
417 B
JavaScript

// Changes the address bar without navigating. Pages are interactive one by one, so
// NavigationManager.NavigateTo runs an enhanced navigation (the page is rendered again on the
// server and merged into the DOM), which the JSON editor can't survive.
/** Replaces the current history entry's URL, keeping Blazor's history state. */
export function replace(url) {
history.replaceState(history.state, '', url);
}