function listenTo(registrationName, contentDocumentHandle) {
	    var mountAt = contentDocumentHandle;
	    var isListening = getListeningForDocument(mountAt);
	    var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];

	    var topLevelTypes = EventConstants.topLevelTypes;
	    for (var i = 0; i < dependencies.length; i++) {
	      var dependency = dependencies[i];
	      if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
	        if (dependency === topLevelTypes.topWheel) {
	          if (isEventSupported('wheel')) {
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'wheel', mountAt);
	          } else if (isEventSupported('mousewheel')) {
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'mousewheel', mountAt);
	          } else {
	            // Firefox needs to capture a different mouse scroll event.
	            // @see http://www.quirksmode.org/dom/events/tests/scroll.html
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'DOMMouseScroll', mountAt);
	          }
	        } else if (dependency === topLevelTypes.topScroll) {

	          if (isEventSupported('scroll', true)) {
	            ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, 'scroll', mountAt);
	          } else {
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
	          }
	        } else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) {

	          if (isEventSupported('focus', true)) {
	            ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, 'focus', mountAt);
	            ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, 'blur', mountAt);
	          } else if (isEventSupported('focusin')) {
	            // IE has `focusin` and `focusout` events which bubble.
	            // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, 'focusin', mountAt);
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, 'focusout', mountAt);
	          }

	          // to make sure blur and focus event listeners are only attached once
	          isListening[topLevelTypes.topBlur] = true;
	          isListening[topLevelTypes.topFocus] = true;
	        } else if (topEventMapping.hasOwnProperty(dependency)) {
	          ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
	        }

	        isListening[dependency] = true;
	      }
	    }
	  }
/**
	   * We listen for bubbled touch events on the document object.
	   *
	   * Firefox v8.01 (and possibly others) exhibited strange behavior when
	   * mounting `onmousemove` events at some node that was not the document
	   * element. The symptoms were that if your mouse is not moving over something
	   * contained within that mount point (for example on the background) the
	   * top-level listeners for `onmousemove` won't be called. However, if you
	   * register the `mousemove` on the document object, then it will of course
	   * catch all `mousemove`s. This along with iOS quirks, justifies restricting
	   * top-level listeners to the document object only, at least for these
	   * movement types of events and possibly all events.
	   *
	   * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
	   *
	   * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
	   * they bubble to document.
	   *
	   * @param {string} registrationName Name of listener (e.g. `onClick`).
	   * @param {object} contentDocumentHandle Document which owns the container
	   */
We listen for bubbled touch events on the document object.
Firefox v8.01 (and possibly others) exhibited strange behavior when
mounting `onmousemove` events at some node that was not the document
element. The symptoms were that if your mouse is not moving over something
contained within that mount point (for example on the background) the
top-level listeners for `onmousemove` won't be called. However, if you
register the `mousemove` on the document object, then it will of course
catch all `mousemove`s. This along with iOS quirks, justifies restricting
top-level listeners to the document object only, at least for these
movement types of events and possibly all events.





@param {string} registrationName Name of listener .
@param {object} contentDocumentHandle Document which owns the container
We listen for bubbled touch events on the document object . Firefox v8 . 01 ( and possibly others ) exhibited strange behavior when mounting ` onmousemove ` events at some node that was not the document element . The symptoms were that if your mouse is not moving over something contained within that mount point ( for example on the background ) the top - level listeners for ` onmousemove ` won ' t be called . However if you register the ` mousemove ` on the document object then it will of course catch all ` mousemove ` s . This along with iOS quirks justifies restricting top - level listeners to the document object only at least for these movement types of events and possibly all events . @param { string } registrationName Name of listener . @param { object } contentDocumentHandle Document which owns the container
function listenTo(registrationName, contentDocumentHandle) {
	    var mountAt = contentDocumentHandle;
	    var isListening = getListeningForDocument(mountAt);
	    var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
	    var topLevelTypes = EventConstants.topLevelTypes;
	    for (var i = 0; i < dependencies.length; i++) {
	      var dependency = dependencies[i];
	      if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
	        if (dependency === topLevelTypes.topWheel) {
	          if (isEventSupported('wheel')) {
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'wheel', mountAt);
	          } else if (isEventSupported('mousewheel')) {
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'mousewheel', mountAt);
	          } else {
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'DOMMouseScroll', mountAt);
	          }
	        } else if (dependency === topLevelTypes.topScroll) {
	          if (isEventSupported('scroll', true)) {
	            ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, 'scroll', mountAt);
	          } else {
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
	          }
	        } else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) {
	          if (isEventSupported('focus', true)) {
	            ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, 'focus', mountAt);
	            ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, 'blur', mountAt);
	          } else if (isEventSupported('focusin')) {
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, 'focusin', mountAt);
	            ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, 'focusout', mountAt);
	          }
	          isListening[topLevelTypes.topBlur] = true;
	          isListening[topLevelTypes.topFocus] = true;
	        } else if (topEventMapping.hasOwnProperty(dependency)) {
	          ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
	        }
	        isListening[dependency] = true;
	      }
	    }
	  }
function listenTo ( registrationName , contentDocumentHandle ) { var mountAt = contentDocumentHandle ; var isListening = getListeningForDocument ( mountAt ) ; var dependencies = EventPluginRegistry . registrationNameDependencies [ registrationName ] ; var topLevelTypes = EventConstants . topLevelTypes ; for ( var i = 0 ; i < dependencies . length ; i ++ ) { var dependency = dependencies [ i ] ; if ( ! ( isListening . hasOwnProperty ( dependency ) && isListening [ dependency ] ) ) { if ( dependency === topLevelTypes . topWheel ) { if ( isEventSupported ( 'wheel' ) ) { ReactBrowserEventEmitter . ReactEventListener . trapBubbledEvent ( topLevelTypes . topWheel , 'wheel' , mountAt ) ; } else if ( isEventSupported ( 'mousewheel' ) ) { ReactBrowserEventEmitter . ReactEventListener . trapBubbledEvent ( topLevelTypes . topWheel , 'mousewheel' , mountAt ) ; } else { ReactBrowserEventEmitter . ReactEventListener . trapBubbledEvent ( topLevelTypes . topWheel , 'DOMMouseScroll' , mountAt ) ; } } else if ( dependency === topLevelTypes . topScroll ) { if ( isEventSupported ( 'scroll' , true ) ) { ReactBrowserEventEmitter . ReactEventListener . trapCapturedEvent ( topLevelTypes . topScroll , 'scroll' , mountAt ) ; } else { ReactBrowserEventEmitter . ReactEventListener . trapBubbledEvent ( topLevelTypes . topScroll , 'scroll' , ReactBrowserEventEmitter . ReactEventListener . WINDOW_HANDLE ) ; } } else if ( dependency === topLevelTypes . topFocus || dependency === topLevelTypes . topBlur ) { if ( isEventSupported ( 'focus' , true ) ) { ReactBrowserEventEmitter . ReactEventListener . trapCapturedEvent ( topLevelTypes . topFocus , 'focus' , mountAt ) ; ReactBrowserEventEmitter . ReactEventListener . trapCapturedEvent ( topLevelTypes . topBlur , 'blur' , mountAt ) ; } else if ( isEventSupported ( 'focusin' ) ) { ReactBrowserEventEmitter . ReactEventListener . trapBubbledEvent ( topLevelTypes . topFocus , 'focusin' , mountAt ) ; ReactBrowserEventEmitter . ReactEventListener . trapBubbledEvent ( topLevelTypes . topBlur , 'focusout' , mountAt ) ; } isListening [ topLevelTypes . topBlur ] = true ; isListening [ topLevelTypes . topFocus ] = true ; } else if ( topEventMapping . hasOwnProperty ( dependency ) ) { ReactBrowserEventEmitter . ReactEventListener . trapBubbledEvent ( dependency , topEventMapping [ dependency ] , mountAt ) ; } isListening [ dependency ] = true ; } } }
We listen for bubbled touch events on the document object.
We listen for bubbled touch events on the document object .
// Firefox needs to capture a different mouse scroll event. // @see http://www.quirksmode.org/dom/events/tests/scroll.html // IE has `focusin` and `focusout` events which bubble. // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html // to make sure blur and focus event listeners are only attached once