MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / compileNodeList

Function compileNodeList

06.Router/basic/js/vue.js:7274–7284  ·  view source on GitHub ↗

* Compile a node list and return a childLinkFn. * * @param {NodeList} nodeList * @param {Object} options * @return {Function|undefined}

(nodeList, options)

Source from the content-addressed store, hash-verified

7272 */
7273
7274 function compileNodeList(nodeList, options) {
7275 var linkFns = [];
7276 var nodeLinkFn, childLinkFn, node;
7277 for (var i = 0, l = nodeList.length; i < l; i++) {
7278 node = nodeList[i];
7279 nodeLinkFn = compileNode(node, options);
7280 childLinkFn = !(nodeLinkFn && nodeLinkFn.terminal) && node.tagName !== 'SCRIPT' && node.hasChildNodes() ? compileNodeList(node.childNodes, options) : null;
7281 linkFns.push(nodeLinkFn, childLinkFn);
7282 }
7283 return linkFns.length ? makeChildLinkFn(linkFns) : null;
7284 }
7285
7286 /**
7287 * Make a child link function for a node's childNodes.

Callers 1

compileFunction · 0.70

Calls 2

compileNodeFunction · 0.70
makeChildLinkFnFunction · 0.70

Tested by

no test coverage detected