[whatwg] element.onFocus instead of window.onhashcange ?
svartman95 at gmail.com
Sat Nov 21 13:33:24 PST 2009
On 11/19/09, Dean Edwards <dean.edwards at gmail.com> wrote:
> 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.
Could you please explain to me (forgive me, I haven't got much
experience on this topic) why "webapps" can't either have a specific
element for <inbox> and <sent mail>, or even different pages? Why is
it so terrible to navigate to another page to fetch another mail
folder? They have to fetch the data from the server anyway. And even
if they wan't to do some fancy AJAXy stuff they can always use the
HIDDEN attr (or CSS) to hide currently irrelevant parts of the app and
And I think these approaches would be more backwards-compatible than
rewriting the document with XHR on hashchange.
And btw, my Gmail is configured to use 'basic HTML', which AFAIK makes
each view a new page.
More information about the whatwg