That "onhashchange" in window stuff doesn't work in firefox. Here is my completely untested version:
http://gist.github.com/286636 On Tue, Jan 26, 2010 at 9:31 AM, Eneko Alonso <[email protected]>wrote: > I Aaron, > > I think that is a great idea. Currently in our project we are detecting if > the browser supports window.onhashchange and if not we start pooling. > > if ("onhashchange" in window) { > window.onhashchange = this.hashChanged.bind(this); > } else { > // start pooling > } > > I was wondering how would you implement that custom event. Would you add it > to the window object? > > Thanks > > > On Mon, Jan 25, 2010 at 4:15 PM, Aaron Newton <[email protected]> wrote: > >> I was considering making a MooTools custom event that does this for you. >> If you're in a browser that doesn't support the event, it would start a >> global poller. Just never got around to it... >> >> >> On Fri, Jan 22, 2010 at 3:12 PM, fakedarren <[email protected]>wrote: >> >>> Firefox 3.6 and IE8 have an onHashChange event you can use - the other >>> browsers I believe you would need some kind of polling. >>> >>> On Jan 22, 10:46 pm, Ryan Florence <[email protected]> wrote: >>> > Is polling the only way to check for changes in the >>> > window.location.hash? >>> > >>> > Sent from my iPhone >>> >> >> >
