Is it possible to capture the window.location.replace event?
问题 If I'm currently at the URL "example.com/somepage#somehash" and I invoke window.location.hash = "anotherhash" , the URL changes to "example.com/somepage#anotherhash" . This fires the window.hashashchange event. If I am currently at the URL "example.com/somepage?a=1&b=two" and I invoke window.location.replace("?one=1&two=2") , then the URL changes to "example.com/somepage?one=1&two=2" . I've read the MDN docs, and I can't find an even that this fires. Is there one? If not, is there a simple