facebook/react — pull request #780 by syranide (2014-01-02 14:56:01+00:00)
Title: Recode of isEventSupported, remove unnecessary code and tests

I did a double-take on `isEventSupported` and realized when I got down to it that it was still pretty shoddy.

I now consider it unnecessary to mention that it borrows from Modernizr, it no longer does. Yes, the method for supporting older FireFox versions is still there, but that was seemingly not pioneered by Modernizr to begin with.

It no longer uses the shoddy `hasFeature` test for `wheel` on Internet Explorer. The actual event on Internet Explorer is `mousewheel` and we actively test for and use that already in React when `wheel` is not supported. So no reason to apply weird feature detection for it.

It now performs all the tests directly on `document` instead of `document.createElement('div')`, unless we need to use the fallback method. In my tests, in all primary major browsers and IE8-11, this method has identical results to testing on a `

` for any event we are interested in.

I have at this point **not** extensively tested this PR (but the methods are sound), I intentionally submit it early to determine your overall feedback towards this, as this is a difficult area to fully test.

```
raw gz Compared to master @ e91a8a1bc30e675c4683d5667b4122106962828b
-168 -38 build/react-with-addons.js
-196 -80 build/react-with-addons.min.js
-168 -36 build/react.js
-196 -74 build/react.min.js
```