Add feature test for document.createEvent

See #5157.
This commit is contained in:
Ben Alpert
2015-10-13 16:34:05 -07:00
parent af99b2c2a3
commit 1206d8d2eb
+3 -1
View File
@@ -61,7 +61,9 @@ if (__DEV__) {
* real browser event.
*/
if (typeof window !== 'undefined' &&
typeof window.dispatchEvent === 'function') {
typeof window.dispatchEvent === 'function' &&
typeof document !== 'undefined' &&
typeof document.createEvent === 'function') {
var fakeNode = document.createElement('react');
ReactErrorUtils.invokeGuardedCallback = function(name, func, a, b) {
var boundFunc = func.bind(null, a, b);