ramiel / router.js

Router.js is a simple and powerful javascript library to handle routing
116 stars 21 forks source link

IE 8 Support #11

Closed jonathanamartin closed 9 years ago

jonathanamartin commented 9 years ago

This looks to be one of the better routing frameworks out there. As you mentioned, not too much, not too little.

I have a requirement that it work on IE 8. Your documentation states that it works on IE 8+. I noticed it was failing attempting to use window.history.pushState. I attempted to add a polyfill but got double hash marks.

https://github.com/devote/HTML5-History-API/issues/58

Is using a polyfill the recommended approach to supporting IE 8? If so, do you have one that you've used that works well?

Any help would be greatly appreciated.

ramiel commented 9 years ago

Hi, thank you for your kind words. This library used to work on IE8 but then I changed the implementation (in order to support something I forgot about). Since you're asking support for IE8 I'll fix the library to support it again. If you need the modifications earlier you can use a polyfill or try to fix the problem yourself and make a pull request ;)

ramiel commented 9 years ago

I've just launched the tests on IE8 and all seems working. What error have you exactly?

ramiel commented 9 years ago

I was able again to make it work under ie8 apparentely. Tests fail but I sppose is something related to the test suite and no to the library itself. I don't like the solution (should work on every browser but it's not so performant) so I decided to not integrate it on development branch for now until I fix tests and/or find another solution. Onestly I'm also thinking about dropping IE8 support. For now if you really need ie8 support use the branch feature/ie8.

jonathanamartin commented 9 years ago

Hey thanks for looking into this Ramiel! We shouldn't have to support IE 8 for too much longer. Until that point we'll just use the IE 8 feature branch.

Will that work on modern browsers as well? I guess I could give it a shot to see :)