This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9389 - add location change event
Summary: add location change event
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: LC
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-02 11:04 UTC by contributor
Modified: 2010-10-04 14:56 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2010-04-02 11:04:11 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#events

Comment:
add location change event

Posted from: 93.206.136.179
Comment 1 Axel Dahmen 2010-04-02 11:07:15 UTC
When several bookmarks of a page are stored, all pointing to different anchors in that same document, it's currently impossible to get a notion about one of the bookmarks having been selected.

I suggest to add an onchange event to the window.location object so that changes to the hash value may be recognized.
Comment 2 Maciej Stachowiak 2010-04-04 07:24:33 UTC
(In reply to comment #1)
> When several bookmarks of a page are stored, all pointing to different anchors
> in that same document, it's currently impossible to get a notion about one of
> the bookmarks having been selected.
> 
> I suggest to add an onchange event to the window.location object so that
> changes to the hash value may be recognized.

The event you are asking for already exists; it's called "hashchange":
http://dev.w3.org/html5/spec/Overview.html#event-hashchange
Comment 3 Ian 'Hixie' Hickson 2010-04-12 23:37:09 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: no spec change
Rationale: Please reopen this if 'hashchange' doesn't do what you want.
Comment 4 Axel Dahmen 2010-04-15 07:45:00 UTC
Excellent! (Sorry for my late reply. E-mails from this domain seem to have landed in my Junk folder. Found them now.)