4

I integrated History.js and this piece of code runs on URL change:

History.Adapter.bind(window,'statechange',function(){ 
    var State = History.getState();
    alert(State.url)
    showPage(State.url);
});

It works well in all browsers except IE7 (compatibility mode of IE8). I thought History.js would handle this.

Is it true that IE7 does not understand onStateChange event? What window event can be used for this case?

balupton
  • 47,113
  • 32
  • 131
  • 182
Vad
  • 3,658
  • 8
  • 46
  • 81

1 Answers1

1

From the notes on compatibility it states:

MSIE 6 and 7 sometimes do not apply a hash even it was told to (requiring a second call to the apply function)

https://github.com/browserstate/History.js/

Community
  • 1
  • 1
StefanHayden
  • 3,569
  • 1
  • 31
  • 38
  • Hmmm... that line in the documentation follows: "History.js solves the following browser bugs:" If History.js solves for said list of HTML4 browser bugs, then this answer is cyclical and the opposite of correct, since it apparently still breaks in IE7 - right? – jozecuervo May 31 '12 at 22:29