code: function(oldChild, markup) {
      ("production" !== "development" ? invariant(
        ExecutionEnvironment.canUseDOM,
        'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' +
        'worker thread. Make sure `window` and `document` are available ' +
        'globally before requiring React when unit testing or use ' +
        'React.renderToString for server rendering.'
      ) : invariant(ExecutionEnvironment.canUseDOM));
      ("production" !== "development" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup));
      ("production" !== "development" ? invariant(
        oldChild.tagName.toLowerCase() !== 'html',
        'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' +
        '<html> node. This is because browser quirks make this unreliable ' +
        'and/or slow. If you want to render to the root you must use ' +
        'server rendering. See React.renderToString().'
      ) : invariant(oldChild.tagName.toLowerCase() !== 'html'));
  
      var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
      oldChild.parentNode.replaceChild(newChild, oldChild);
    }
docs: Replaces a node with a string of markup at its current position within its
  parent. The markup must render into a single root node.
  
  @param {DOMElement} oldChild Child node to replace.
  @param {string} markup Markup to render in place of the child node.
  @internal