baseprime / grapnel

The smallest JavaScript router with named parameters, HTML5 pushState, and middleware support
http://grapnel.js.org
468 stars 40 forks source link

Adding IE8 support and fixing Require JS optimiser compatibility #47

Closed asos-massimo closed 9 years ago

asos-massimo commented 9 years ago

Hey Greg

Thanks for your great work on Grapnel JS, we've started using it for one of our projects and it's doing the job nicely for us.

We were previously using the library from NPM, but it was missing 2 features we really need. One of these is IE8 support, and the other is compatibility with the Require JS optimiser (r.js). So in the mean time we're referencing the library locally.

Instead of asking you to add this features, we've created a fork and implemented them there. It would be great if you could incorporate these, so that we could reference Grapnel from NPM and have all those benefits again.

Looking forward to your feedback

Thanks!

baseprime commented 9 years ago

Thank you for contributing! The only issue is that define is being accessed globally when we only want to access it relative to root. We want to maintain forwards compatibility with routers that may be used on the server side as well.

baseprime commented 9 years ago

@massimoahmadi Try checking out the feature/r-js branch and see if that helps. :+1:

asos-massimo commented 9 years ago

Hey Greg

I've tried out the fix in the feature/r-js branch and it solves the issue. You can merge that into master.

What are your thoughts on supporting IE8/9 via onhashchange going forwards?

Thanks