src/v1/index.js
function registerNode (host, node, insertBefore, func) {
  const index = indexOfNode(host, insertBefore);
  eachNodeOrFragmentNodes(node, (eachNode, eachIndex) => {
    func(eachNode, eachIndex);

    if (canPatchNativeAccessors) {
      nodeToParentNodeMap.set(eachNode, host);
    } else {
      staticProp(eachNode, 'parentNode', host);
    }

    // When childNodes is artificial, do manual house keeping.
    if (Array.isArray(host.childNodes)) {
      if (index > -1) {
        arrProto.splice.call(host.childNodes, index + eachIndex, 0, eachNode);
      } else {
        arrProto.push.call(host.childNodes, eachNode);
      }
    }
  });
}
function registerNode (host, node, insertBefore, func) {
  const index = indexOfNode(host, insertBefore);
  eachNodeOrFragmentNodes(node, (eachNode, eachIndex) => {
    func(eachNode, eachIndex);

    if (canPatchNativeAccessors) {
      nodeToParentNodeMap.set(eachNode, host);
    } else {
      staticProp(eachNode, 'parentNode', host);
    }

    // When childNodes is artificial, do manual house keeping.
    if (Array.isArray(host.childNodes)) {
      if (index > -1) {
        arrProto.splice.call(host.childNodes, index + eachIndex, 0, eachNode);
      } else {
        arrProto.push.call(host.childNodes, eachNode);
      }
    }
  });
}
function registerNode ( host , node , insertBefore , func ) { const index = indexOfNode ( host , insertBefore ) ; eachNodeOrFragmentNodes ( node , ( eachNode , eachIndex ) => { func ( eachNode , eachIndex ) ; if ( canPatchNativeAccessors ) { nodeToParentNodeMap . set ( eachNode , host ) ; } else { staticProp ( eachNode , 'parentNode' , host ) ; } // When childNodes is artificial, do manual house keeping. if ( Array . isArray ( host . childNodes ) ) { if ( index > - 1 ) { arrProto . splice . call ( host . childNodes , index + eachIndex , 0 , eachNode ) ; } else { arrProto . push . call ( host . childNodes , eachNode ) ; } } } ) ; }
Adds the node to the list of childNodes on the host and fakes any necessary information such as parentNode.
Adds the node to the list of childNodes on the host and fakes any necessary information such as parentNode .