[whatwg] element.onFocus instead of window.onhashcange ?

Dean Edwards dean.edwards at gmail.com
Wed Nov 18 16:38:48 PST 2009

On 17/11/2009 15:50, Bjartur Thorlacius wrote:
> As the discussion had turned into bunch (good) advice giving, I
> decided to repost this if anyone actually has opinion on this matter
> and/or could tell me why the spec recommends firing hashchange on the
> document instead of a specific element when a user navigates to a URI
> with a hash component.

A lot of Ajax apps will manipulate the value of location.hash to 
represent the *state of the application*. In this case there is no 
corresponding element to trap the onfocus event.


More information about the whatwg mailing list