var hash = "#foo"
- pushState(1, null, hash)
- click internal link
<a href="foo">
- hisotory.state losts in FF
history.pushState(1, null, "#section1")
console.log(history.state)
document.querySelector("a[href='#section1']").click()
// semehow you need to wait
setTimeout(function(){
console.log(history.state)
}, 100)