W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2012

[whatwg] Asynchronous history navigation and some inconsistencies

From: Pablo Flouret <pablof@motorola.com>
Date: Thu, 09 Feb 2012 12:20:56 -0800
Message-ID: <op.v9fhg6btblozfe@berserk.local>
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
Received on Thursday, 9 February 2012 12:20:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:11 UTC