jdlehman/jsrouter

IE support.

Closed this issue · 3 comments

IE11 hashchange event doesn't have #oldURL and #newURL keys, preventing 'enter' handlers from being fired.

Do the events have comparable keys with different names?

If not, the new URL we could get with currentPath. So we could do something like newURL || this.currentPath(). The oldURL is trickier. We could add functionality that keeps track of the oldURL in some state. So on load, we set the next oldURL to be the current newURL. and we can do the same thing on each hash change. I don't really like having to keep extra state, so I'd be keen to see if there is a way we can get this data out of IE events.

Unfortunately, no, it doesn't. jsrouter needs to track it itself.

addressed by #15