chore(syntheticEvent): remove IE8 code (#11178)

* chore(syntheticEvent): remove IE8 code

Since IE8 has been deprecated for a while, I thought it might be useful to remove some IE8-only code

If this is not something you want to focus on yet, or is too much work to test, feel free to close this PR

* Update SyntheticUIEvent.js

* Update SyntheticUIEvent.js

* remove unused require

* completely remove UIEvent

* augment with noop

everything breaks otherwise

* comment back

* spacing
This commit is contained in:
Haroen Viaene
2017-10-12 14:30:47 -07:00
committed by Nathan Hunzaker
parent 19043236be
commit 0c5a455ecb
@@ -11,35 +11,13 @@
var SyntheticEvent = require('SyntheticEvent');
var getEventTarget = require('getEventTarget');
/**
* @interface UIEvent
* @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
var UIEventInterface = {
view: function(event) {
if (event.view) {
return event.view;
}
var target = getEventTarget(event);
if (target.window === target) {
// target is a window object
return target;
}
var doc = target.ownerDocument;
// TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
if (doc) {
return doc.defaultView || doc.parentWindow;
} else {
return window;
}
},
detail: function(event) {
return event.detail || 0;
},
view: null,
detail: null,
};
/**