Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const routes = {};
- window.onpopstate = function(event) {
- console.log('window.onpopstate');
- $("html").html(routes[window.location.pathname]);
- };
- window.addEventListener('load', function() {
- console.log('window.load');
- $("html").html(routes[window.location.pathname]);
- });
- history.pushState({}, window.location.pathname, window.location.origin + uri);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement