W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

[whatwg] Question about "certain cases" for popstate event

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 16 Jun 2011 03:42:43 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1106160250170.19153@ps20323.dreamhostps.com>
On Tue, 5 Apr 2011, Rafa?~B Mi?~Becki wrote:
> 
> There is part of the spec that do not see too obvious for me. Could you 
> help me with that?
> 
> 6.5.9.1 says:
> > The popstate event is fired in certain cases when navigating to a 
> > session history entry.
>
> Where can I find definition of that "certain cases"?

If you click on "popstate" you'll be taken to the definition of 
"popstate"; if you click on it again you'll be presented with a list of 
all the references. Or, you can just search for "popstate". Either way 
you'll find that the only place that fires it is here:

http://www.whatwg.org/specs/web-apps/current-work/complete/history.html#history-traversal

The next question of course is "when is that algorithm invoked". If you 
click on its definition (the bold text at the top of that section) then 
you'll get a list of the places where it's mentioned. The exact answer is 
rather subtle and I'm reluctant to try to summarise it.


> Google Chrome 10 seems to fire popstate even if I open totally new page.
> Firefox 4 seems to fire event only on going back/forward

How are you determining if Firefox fires the event? Are you sure you're 
not just checking after Firefox has fired it?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 15 June 2011 20:42:43 UTC

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