code: function getID(node) {
    var id = internalGetID(node);
    if (id) {
      if (nodeCache.hasOwnProperty(id)) {
        var cached = nodeCache[id];
        if (cached !== node) {
          ("production" !== "development" ? invariant(
            !isValid(cached, id),
            'ReactMount: Two valid but unequal nodes with the same `%s`: %s',
            ATTR_NAME, id
          ) : invariant(!isValid(cached, id)));
  
          nodeCache[id] = node;
        }
      } else {
        nodeCache[id] = node;
      }
    }
  
    return id;
  }
docs: Accessing node[ATTR_NAME] or calling getAttribute(ATTR_NAME) on a form
  element can return its control whose name or ID equals ATTR_NAME. All
  DOM nodes support `getAttributeNode` but this can also get called on
  other objects so just return '' if we're given something other than a
  DOM node (such as window).
  
  @param {?DOMElement|DOMWindow|DOMDocument|DOMTextNode} node DOM node.
  @return {string} ID of the supplied `domNode`.