@HolgerJeromin commented on this pull request.
> @@ -2,6 +2,15 @@
/* globals iD */
+(() => {
+ const originalReplaceState = window.history.replaceState;
+ window.history.replaceState = function (...args) {
+ const result = originalReplaceState.apply(this, args);
+ window.dispatchEvent(new CustomEvent("replaceHistoryState", { detail: args
}));
+ return result;
+ };
+})();
I do not like this approach as you know, but it is not unusual in JS world.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6811#discussion_r2876543939
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6811/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev