[whatwg] Asynchronous history navigation and some inconsistencies

Pablo Flouret pablof at motorola.com
Thu Feb 9 12:20:56 PST 2012


Hey there,

I'm trying this out:

<!DOCTYPE html>
<script>
history.pushState(1, "", "#1");
history.pushState(2, "", "#2");
window.onpopstate = function (e) { alert(e.state); }
history.back();
history.pushState(3, "", "#3");
</script>

WebKit:
alerts 2 (bug, i'd say)
history is #1, #2, #3

Gecko:
alerts 1
history is #1, #3

Opera:
Doesn't fire the event (bug?)
history is #1, #2, #3

Don't have an IE to test right now, so not sure what happens there.

What should be happening here ideally?

Cheers,

-- 
pablo flouret


More information about the whatwg mailing list