history.pushState не вызывает событие «popstate»
Зачем
$(function () {
$(window).bind('popstate', function () {alert('pop');});
window.history.pushState(null, '', '/foo');
});
не предупреждаетpop
?
Примечание: тестирование на последнем Chrome
--
В соответствии сMDN:
A popstate event is dispatched to the window every time the active history entry changes. If the history entry being activated was created by a call to pushState or affected by a call to replaceState, the popstate event's state property contains a copy of the history entry's state object.
Так почему мойpushState
не вызываетpopstate
событие?