W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2009

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

From: Dean Edwards <dean.edwards@gmail.com>
Date: Thu, 19 Nov 2009 00:38:48 +0000
Message-ID: <4B049398.70207@gmail.com>
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.

Received on Wednesday, 18 November 2009 16:38:48 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:19 UTC