W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2007

[whatwg] hashchange only dispatched in history traversal

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Sat, 11 Aug 2007 22:36:11 -0400
Message-ID: <6b9c91b20708111936h75f9f50cw1fdad8412ed1eb37@mail.gmail.com>
On 8/10/07, Maciej Stachowiak <mjs at apple.com> wrote:
> I would also suggest calling it something other than hashchange. I
> realize the term "hash" is used in other places in the HTML DOM to
> refer to the fragment ID but it sounds weird in an event name like
> that. CSS uses "target" and the URI RFC uses "fragment identifier".

I like "hashchange" even if it's not perfectly descriptive.

However, "fragmentidentifierchange" although long, isn't much longer
than DOMAttributeModified
and is shorter than say, DOMNodeRemovedFromDocument.

addEventListener("fragmentidentifierchange" doesn't seem too bad to me.

And, if for some reason you wanted it shortened in your script, you
could just do:

var hashchange = "fragmentidentifierchange";
a.addEventListener(hashchange
b.addEventListener(hashchange
c.addEventListener(hashchange

-- 
Michael
Received on Saturday, 11 August 2007 19:36:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:36 UTC