fofr/matchMedia.js — pull request #3 by jalada (2012-02-15 08:42:18+00:00)
Title: Fall back to native Firefox implementation

I wouldn't suggest pulling this in as it is, I've probably made some decisions you might not want.

[Firefox has native support for listening to matchMedia events](https://developer.mozilla.org/en/DOM/MediaQueryListListener) so this fork falls back to that if it's available. I did this because for some reason, the `transitionend` event seems to have disappeared in Firefox...? Might just be something weird going on on my set up, but it was causing an error as no CSS transition was available.

Additionally:

- I re-added the matchMedia polyfill function itself. You may not want this. In my situation I do the check for CSS transitions myself and so want the matchMedia polyfill for backwards compatibility. This may be wrong...
- I adjusted some indentation :)