[whatwg] Proposing: "autoscroll" event
James Greene
james.m.greene at gmail.com
Wed Jun 12 12:20:21 PDT 2013
Although it may (will?) incur additional reflows, here's a short term hack:
1. On "DOMContentLoaded" (or equivalent), sniff the element ID from the
hash and visually hide that element. This will prevent the browser from
auto-scrolling.
2. On "load", visually show that element again and then scroll to it (or
not, up to you).
Sincerely,
James Greene
On Tue, May 14, 2013 at 4:44 PM, Glenn Maynard <glenn at zewt.org> wrote:
> On Tue, May 14, 2013 at 5:01 PM, Nils Dagsson Moskopp <
> nils at dieweltistgarnichtso.net> wrote:
>
> > The simplest solution (by far) would be to stop storing “information
> > that is used by JS” in a hash. Even Internet Explorer has pushState()
> > these days: <http://caniuse.com/history>.
> >
>
> Web APIs have to deal with how things are actually used, not how you wish
> they were. Storing state in the hash is a reality.
>
> Additionally, pushState does not replace storing state in the hash, nor was
> it intended to.
>
> --
> Glenn Maynard
>
More information about the whatwg
mailing list