aboutsummaryrefslogtreecommitdiff
path: root/node_modules/react/lib/ReactTransitionEvents.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-10-14 18:40:54 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-10-14 18:40:54 +0200
commit9df98e65f842cf3acae09cbdd969966f42d64469 (patch)
treef071d3e09a342c208fb8e1cd3f5241d64fbfbaf3 /node_modules/react/lib/ReactTransitionEvents.js
parent008926b18470e7f394cd640302957b29728a9803 (diff)
update dependencies
Diffstat (limited to 'node_modules/react/lib/ReactTransitionEvents.js')
-rw-r--r--node_modules/react/lib/ReactTransitionEvents.js72
1 files changed, 0 insertions, 72 deletions
diff --git a/node_modules/react/lib/ReactTransitionEvents.js b/node_modules/react/lib/ReactTransitionEvents.js
deleted file mode 100644
index ca4b7e716..000000000
--- a/node_modules/react/lib/ReactTransitionEvents.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-
-'use strict';
-
-var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
-
-var getVendorPrefixedEventName = require('react-dom/lib/getVendorPrefixedEventName');
-
-var endEvents = [];
-
-function detectEvents() {
- var animEnd = getVendorPrefixedEventName('animationend');
- var transEnd = getVendorPrefixedEventName('transitionend');
-
- if (animEnd) {
- endEvents.push(animEnd);
- }
-
- if (transEnd) {
- endEvents.push(transEnd);
- }
-}
-
-if (ExecutionEnvironment.canUseDOM) {
- detectEvents();
-}
-
-// We use the raw {add|remove}EventListener() call because EventListener
-// does not know how to remove event listeners and we really should
-// clean up. Also, these events are not triggered in older browsers
-// so we should be A-OK here.
-
-function addEventListener(node, eventName, eventListener) {
- node.addEventListener(eventName, eventListener, false);
-}
-
-function removeEventListener(node, eventName, eventListener) {
- node.removeEventListener(eventName, eventListener, false);
-}
-
-var ReactTransitionEvents = {
- addEndEventListener: function (node, eventListener) {
- if (endEvents.length === 0) {
- // If CSS transitions are not supported, trigger an "end animation"
- // event immediately.
- window.setTimeout(eventListener, 0);
- return;
- }
- endEvents.forEach(function (endEvent) {
- addEventListener(node, endEvent, eventListener);
- });
- },
-
- removeEndEventListener: function (node, eventListener) {
- if (endEvents.length === 0) {
- return;
- }
- endEvents.forEach(function (endEvent) {
- removeEventListener(node, endEvent, eventListener);
- });
- }
-};
-
-module.exports = ReactTransitionEvents; \ No newline at end of file