From 0c5a455ecb33041f973e9770e8d8dc5fccfcf484 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Thu, 12 Oct 2017 14:30:47 -0700 Subject: [PATCH] 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 --- .../syntheticEvents/SyntheticUIEvent.js | 26 ++----------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/renderers/dom/shared/syntheticEvents/SyntheticUIEvent.js b/src/renderers/dom/shared/syntheticEvents/SyntheticUIEvent.js index 9ed589187d..844b8cc360 100644 --- a/src/renderers/dom/shared/syntheticEvents/SyntheticUIEvent.js +++ b/src/renderers/dom/shared/syntheticEvents/SyntheticUIEvent.js @@ -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, }; /**