onroutechange
The polyfill enables you to listen to route changes by customized window.onroutechange
callback.
It's quite similar to window.onhashchange
API, but for history.pushState
. Could be useful for single-page applications.
Usage
Step1. Insert the following script tag into your webpage:
Step2. Register the window.onroutechange
callback, for example:
window { console;};
License
MIT