paulirish/matchMedia.js — pull request #42 by knightdr (2013-08-08 03:58:54+00:00)
Title: Complete rewrite in an effort to gain performance

Performance continues to be a weak point for this polyfill which was a driving force for why I created my own (https://github.com/weblinc/media-match). One of @scottjehl 's criticisms of it was it's size. So this pull request is a compromise that strives for a very similar size to the current version of matchMedia.js with much better performance.

I hope this will solve the following issues:
* IE performance fix: use currentStyle.width instead of offsetWidth - https://github.com/paulirish/matchMedia.js/pull/29
* Introduce a temporary cache - https://github.com/paulirish/matchMedia.js/pull/39
* Bug fix: Stopped IE9 instantly closing select elements - https://github.com/paulirish/matchMedia.js/pull/32

Thoughts?