Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
window.history.pushState = function(...args) {
oldPushState.call(this, ...args);
emit(window, 'pushstate');
};
window.history.replaceState = function(...args) {
window.history.replaceState = function(...args) {
oldReplaceState.call(this, ...args);
emit(window, 'replacestate');
};