* Make a child link function for a node's childNodes. * * @param {Array } linkFns * @return {Function} childLinkFn
(linkFns)
| 7291 | */ |
| 7292 | |
| 7293 | function makeChildLinkFn(linkFns) { |
| 7294 | return function childLinkFn(vm, nodes, host, scope, frag) { |
| 7295 | var node, nodeLinkFn, childrenLinkFn; |
| 7296 | for (var i = 0, n = 0, l = linkFns.length; i < l; n++) { |
| 7297 | node = nodes[n]; |
| 7298 | nodeLinkFn = linkFns[i++]; |
| 7299 | childrenLinkFn = linkFns[i++]; |
| 7300 | // cache childNodes before linking parent, fix #657 |
| 7301 | var childNodes = toArray(node.childNodes); |
| 7302 | if (nodeLinkFn) { |
| 7303 | nodeLinkFn(vm, node, host, scope, frag); |
| 7304 | } |
| 7305 | if (childrenLinkFn) { |
| 7306 | childrenLinkFn(vm, childNodes, host, scope, frag); |
| 7307 | } |
| 7308 | } |
| 7309 | }; |
| 7310 | } |
| 7311 | |
| 7312 | /** |
| 7313 | * Check for element directives (custom elements that should |
no test coverage detected