每当我执行推送状态时,Statechange就会触发

每当我执行推送状态时,Statechange就会触发

问题描述:

我正在使用history.js来处理后退按钮。在history.js中,只要我执行pushstate,statechange就会触发。为什么?

I am using history.js to handle back button. In history.js statechange is firing whenever i do a pushstate. Why?

根据这个讨论github ,它是history.js的预期行为

According to this discussion on github, it's expected behaviour of history.js

这个拉取请求声称修改了history.js以更符合W3C规范。

This pull request claims to have modified history.js to be more inline with W3C Specs.