Evénement onchange sur window.location.href

Je voudrais déclencher quelques javascipt fonction lorsque la fenêtre.emplacement.href lien a changé, est-il possible?

quelque chose comme:

$(window.location.href).on('change', function(){
   doSomething();
});

source d'informationauteur Puchacz