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
Haroen Viaene committed
Oct 12, 2017 at 14:30 UTC
0c5a455ecb33041f973e9770e8d8dc5fccfcf484
1 file changed
+2
-24
src/renderers/dom/shared/syntheticEvents/SyntheticUIEvent.js
+2
-24
@@ -11,35 +11,13 @@
11
12
var SyntheticEvent = require('SyntheticEvent');
13
14
-var getEventTarget = require('getEventTarget');
15
-
14
/**
15
* @interface UIEvent
16
* @see http://www.w3.org/TR/DOM-Level-3-Events/
17
*/
18
var UIEventInterface = {
21
- view: function(event) {
22
- if (event.view) {
23
- return event.view;
24
- }
25
-
26
- var target = getEventTarget(event);
27
- if (target.window === target) {
28
- // target is a window object
29
- return target;
30
- }
31
-
32
- var doc = target.ownerDocument;
33
- // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
34
- if (doc) {
35
- return doc.defaultView || doc.parentWindow;
36
- } else {
37
- return window;
38
- }
39
- },
40
- detail: function(event) {
41
- return event.detail || 0;
42
- },
19
+ view: null,
20
+ detail: null,
21
};
22
23
/**