function mountComponent(transaction, nativeParent, nativeContainerInfo, context) {
	    this._rootNodeID = globalIdCounter++;
	    this._domID = nativeContainerInfo._idCounter++;
	    this._nativeParent = nativeParent;
	    this._nativeContainerInfo = nativeContainerInfo;

	    var props = this._currentElement.props;

	    switch (this._tag) {
	      case 'iframe':
	      case 'object':
	      case 'img':
	      case 'form':
	      case 'video':
	      case 'audio':
	        this._wrapperState = {
	          listeners: null
	        };
	        transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
	        break;
	      case 'button':
	        props = ReactDOMButton.getNativeProps(this, props, nativeParent);
	        break;
	      case 'input':
	        ReactDOMInput.mountWrapper(this, props, nativeParent);
	        props = ReactDOMInput.getNativeProps(this, props);
	        transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
	        break;
	      case 'option':
	        ReactDOMOption.mountWrapper(this, props, nativeParent);
	        props = ReactDOMOption.getNativeProps(this, props);
	        break;
	      case 'select':
	        ReactDOMSelect.mountWrapper(this, props, nativeParent);
	        props = ReactDOMSelect.getNativeProps(this, props);
	        transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
	        break;
	      case 'textarea':
	        ReactDOMTextarea.mountWrapper(this, props, nativeParent);
	        props = ReactDOMTextarea.getNativeProps(this, props);
	        transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
	        break;
	    }

	    assertValidProps(this, props);

	    // We create tags in the namespace of their parent container, except HTML
	    // tags get no namespace.
	    var namespaceURI;
	    var parentTag;
	    if (nativeParent != null) {
	      namespaceURI = nativeParent._namespaceURI;
	      parentTag = nativeParent._tag;
	    } else if (nativeContainerInfo._tag) {
	      namespaceURI = nativeContainerInfo._namespaceURI;
	      parentTag = nativeContainerInfo._tag;
	    }
	    if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
	      namespaceURI = DOMNamespaces.html;
	    }
	    if (namespaceURI === DOMNamespaces.html) {
	      if (this._tag === 'svg') {
	        namespaceURI = DOMNamespaces.svg;
	      } else if (this._tag === 'math') {
	        namespaceURI = DOMNamespaces.mathml;
	      }
	    }
	    this._namespaceURI = namespaceURI;

	    if (process.env.NODE_ENV !== 'production') {
	      var parentInfo;
	      if (nativeParent != null) {
	        parentInfo = nativeParent._ancestorInfo;
	      } else if (nativeContainerInfo._tag) {
	        parentInfo = nativeContainerInfo._ancestorInfo;
	      }
	      if (parentInfo) {
	        // parentInfo should always be present except for the top-level
	        // component when server rendering
	        validateDOMNesting(this._tag, this, parentInfo);
	      }
	      this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
	    }

	    var mountImage;
	    if (transaction.useCreateElement) {
	      var ownerDocument = nativeContainerInfo._ownerDocument;
	      var el;
	      if (namespaceURI === DOMNamespaces.html) {
	        if (this._tag === 'script') {
	          // Create the script via .innerHTML so its "parser-inserted" flag is
	          // set to true and it does not execute
	          var div = ownerDocument.createElement('div');
	          var type = this._currentElement.type;
	          div.innerHTML = '<' + type + '></' + type + '>';
	          el = div.removeChild(div.firstChild);
	        } else {
	          el = ownerDocument.createElement(this._currentElement.type, props.is || null);
	        }
	      } else {
	        el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
	      }
	      ReactDOMComponentTree.precacheNode(this, el);
	      this._flags |= Flags.hasCachedChildNodes;
	      if (!this._nativeParent) {
	        DOMPropertyOperations.setAttributeForRoot(el);
	      }
	      this._updateDOMProperties(null, props, transaction);
	      var lazyTree = DOMLazyTree(el);
	      this._createInitialChildren(transaction, props, context, lazyTree);
	      mountImage = lazyTree;
	    } else {
	      var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
	      var tagContent = this._createContentMarkup(transaction, props, context);
	      if (!tagContent && omittedCloseTags[this._tag]) {
	        mountImage = tagOpen + '/>';
	      } else {
	        mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
	      }
	    }

	    switch (this._tag) {
	      case 'button':
	      case 'input':
	      case 'select':
	      case 'textarea':
	        if (props.autoFocus) {
	          transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
	        }
	        break;
	      case 'option':
	        transaction.getReactMountReady().enqueue(optionPostMount, this);
	    }

	    return mountImage;
	  }
/**
	   * Generates root tag markup then recurses. This method has side effects and
	   * is not idempotent.
	   *
	   * @internal
	   * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
	   * @param {?ReactDOMComponent} the containing DOM component instance
	   * @param {?object} info about the native container
	   * @param {object} context
	   * @return {string} The computed markup.
	   */
Generates root tag markup then recurses. This method has side effects and
is not idempotent.


Generates root tag markup then recurses . This method has side effects and is not idempotent .
function mountComponent(transaction, nativeParent, nativeContainerInfo, context) {
	    this._rootNodeID = globalIdCounter++;
	    this._domID = nativeContainerInfo._idCounter++;
	    this._nativeParent = nativeParent;
	    this._nativeContainerInfo = nativeContainerInfo;
	    var props = this._currentElement.props;
	    switch (this._tag) {
	      case 'iframe':
	      case 'object':
	      case 'img':
	      case 'form':
	      case 'video':
	      case 'audio':
	        this._wrapperState = {
	          listeners: null
	        };
	        transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
	        break;
	      case 'button':
	        props = ReactDOMButton.getNativeProps(this, props, nativeParent);
	        break;
	      case 'input':
	        ReactDOMInput.mountWrapper(this, props, nativeParent);
	        props = ReactDOMInput.getNativeProps(this, props);
	        transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
	        break;
	      case 'option':
	        ReactDOMOption.mountWrapper(this, props, nativeParent);
	        props = ReactDOMOption.getNativeProps(this, props);
	        break;
	      case 'select':
	        ReactDOMSelect.mountWrapper(this, props, nativeParent);
	        props = ReactDOMSelect.getNativeProps(this, props);
	        transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
	        break;
	      case 'textarea':
	        ReactDOMTextarea.mountWrapper(this, props, nativeParent);
	        props = ReactDOMTextarea.getNativeProps(this, props);
	        transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
	        break;
	    }
	    assertValidProps(this, props);
	    var namespaceURI;
	    var parentTag;
	    if (nativeParent != null) {
	      namespaceURI = nativeParent._namespaceURI;
	      parentTag = nativeParent._tag;
	    } else if (nativeContainerInfo._tag) {
	      namespaceURI = nativeContainerInfo._namespaceURI;
	      parentTag = nativeContainerInfo._tag;
	    }
	    if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
	      namespaceURI = DOMNamespaces.html;
	    }
	    if (namespaceURI === DOMNamespaces.html) {
	      if (this._tag === 'svg') {
	        namespaceURI = DOMNamespaces.svg;
	      } else if (this._tag === 'math') {
	        namespaceURI = DOMNamespaces.mathml;
	      }
	    }
	    this._namespaceURI = namespaceURI;
	    if (process.env.NODE_ENV !== 'production') {
	      var parentInfo;
	      if (nativeParent != null) {
	        parentInfo = nativeParent._ancestorInfo;
	      } else if (nativeContainerInfo._tag) {
	        parentInfo = nativeContainerInfo._ancestorInfo;
	      }
	      if (parentInfo) {
	        validateDOMNesting(this._tag, this, parentInfo);
	      }
	      this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
	    }
	    var mountImage;
	    if (transaction.useCreateElement) {
	      var ownerDocument = nativeContainerInfo._ownerDocument;
	      var el;
	      if (namespaceURI === DOMNamespaces.html) {
	        if (this._tag === 'script') {
	          var div = ownerDocument.createElement('div');
	          var type = this._currentElement.type;
	          div.innerHTML = '<' + type + '></' + type + '>';
	          el = div.removeChild(div.firstChild);
	        } else {
	          el = ownerDocument.createElement(this._currentElement.type, props.is || null);
	        }
	      } else {
	        el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
	      }
	      ReactDOMComponentTree.precacheNode(this, el);
	      this._flags |= Flags.hasCachedChildNodes;
	      if (!this._nativeParent) {
	        DOMPropertyOperations.setAttributeForRoot(el);
	      }
	      this._updateDOMProperties(null, props, transaction);
	      var lazyTree = DOMLazyTree(el);
	      this._createInitialChildren(transaction, props, context, lazyTree);
	      mountImage = lazyTree;
	    } else {
	      var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
	      var tagContent = this._createContentMarkup(transaction, props, context);
	      if (!tagContent && omittedCloseTags[this._tag]) {
	        mountImage = tagOpen + '/>';
	      } else {
	        mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
	      }
	    }
	    switch (this._tag) {
	      case 'button':
	      case 'input':
	      case 'select':
	      case 'textarea':
	        if (props.autoFocus) {
	          transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
	        }
	        break;
	      case 'option':
	        transaction.getReactMountReady().enqueue(optionPostMount, this);
	    }
	    return mountImage;
	  }
function mountComponent ( transaction , nativeParent , nativeContainerInfo , context ) { this . _rootNodeID = globalIdCounter ++ ; this . _domID = nativeContainerInfo . _idCounter ++ ; this . _nativeParent = nativeParent ; this . _nativeContainerInfo = nativeContainerInfo ; var props = this . _currentElement . props ; switch ( this . _tag ) { case 'iframe' : case 'object' : case 'img' : case 'form' : case 'video' : case 'audio' : this . _wrapperState = { listeners : null } ; transaction . getReactMountReady ( ) . enqueue ( trapBubbledEventsLocal , this ) ; break ; case 'button' : props = ReactDOMButton . getNativeProps ( this , props , nativeParent ) ; break ; case 'input' : ReactDOMInput . mountWrapper ( this , props , nativeParent ) ; props = ReactDOMInput . getNativeProps ( this , props ) ; transaction . getReactMountReady ( ) . enqueue ( trapBubbledEventsLocal , this ) ; break ; case 'option' : ReactDOMOption . mountWrapper ( this , props , nativeParent ) ; props = ReactDOMOption . getNativeProps ( this , props ) ; break ; case 'select' : ReactDOMSelect . mountWrapper ( this , props , nativeParent ) ; props = ReactDOMSelect . getNativeProps ( this , props ) ; transaction . getReactMountReady ( ) . enqueue ( trapBubbledEventsLocal , this ) ; break ; case 'textarea' : ReactDOMTextarea . mountWrapper ( this , props , nativeParent ) ; props = ReactDOMTextarea . getNativeProps ( this , props ) ; transaction . getReactMountReady ( ) . enqueue ( trapBubbledEventsLocal , this ) ; break ; } assertValidProps ( this , props ) ; var namespaceURI ; var parentTag ; if ( nativeParent != null ) { namespaceURI = nativeParent . _namespaceURI ; parentTag = nativeParent . _tag ; } else if ( nativeContainerInfo . _tag ) { namespaceURI = nativeContainerInfo . _namespaceURI ; parentTag = nativeContainerInfo . _tag ; } if ( namespaceURI == null || namespaceURI === DOMNamespaces . svg && parentTag === 'foreignobject' ) { namespaceURI = DOMNamespaces . html ; } if ( namespaceURI === DOMNamespaces . html ) { if ( this . _tag === 'svg' ) { namespaceURI = DOMNamespaces . svg ; } else if ( this . _tag === 'math' ) { namespaceURI = DOMNamespaces . mathml ; } } this . _namespaceURI = namespaceURI ; if ( process . env . NODE_ENV !== 'production' ) { var parentInfo ; if ( nativeParent != null ) { parentInfo = nativeParent . _ancestorInfo ; } else if ( nativeContainerInfo . _tag ) { parentInfo = nativeContainerInfo . _ancestorInfo ; } if ( parentInfo ) { validateDOMNesting ( this . _tag , this , parentInfo ) ; } this . _ancestorInfo = validateDOMNesting . updatedAncestorInfo ( parentInfo , this . _tag , this ) ; } var mountImage ; if ( transaction . useCreateElement ) { var ownerDocument = nativeContainerInfo . _ownerDocument ; var el ; if ( namespaceURI === DOMNamespaces . html ) { if ( this . _tag === 'script' ) { var div = ownerDocument . createElement ( 'div' ) ; var type = this . _currentElement . type ; div . innerHTML = '<' + type + '></' + type + '>' ; el = div . removeChild ( div . firstChild ) ; } else { el = ownerDocument . createElement ( this . _currentElement . type , props . is || null ) ; } } else { el = ownerDocument . createElementNS ( namespaceURI , this . _currentElement . type ) ; } ReactDOMComponentTree . precacheNode ( this , el ) ; this . _flags |= Flags . hasCachedChildNodes ; if ( ! this . _nativeParent ) { DOMPropertyOperations . setAttributeForRoot ( el ) ; } this . _updateDOMProperties ( null , props , transaction ) ; var lazyTree = DOMLazyTree ( el ) ; this . _createInitialChildren ( transaction , props , context , lazyTree ) ; mountImage = lazyTree ; } else { var tagOpen = this . _createOpenTagMarkupAndPutListeners ( transaction , props ) ; var tagContent = this . _createContentMarkup ( transaction , props , context ) ; if ( ! tagContent && omittedCloseTags [ this . _tag ] ) { mountImage = tagOpen + '/>' ; } else { mountImage = tagOpen + '>' + tagContent + '</' + this . _currentElement . type + '>' ; } } switch ( this . _tag ) { case 'button' : case 'input' : case 'select' : case 'textarea' : if ( props . autoFocus ) { transaction . getReactMountReady ( ) . enqueue ( AutoFocusUtils . focusDOMComponent , this ) ; } break ; case 'option' : transaction . getReactMountReady ( ) . enqueue ( optionPostMount , this ) ; } return mountImage ; }
Generates root tag markup then recurses.
Generates root tag markup then recurses .
// We create tags in the namespace of their parent container, except HTML // tags get no namespace. // parentInfo should always be present except for the top-level // component when server rendering // Create the script via .innerHTML so its "parser-inserted" flag is // set to true and it does not execute