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

Function compileNode

01.GettingStarted/js/vue.js:7093–7102  ·  view source on GitHub ↗

* Compile a node and return a nodeLinkFn based on the * node type. * * @param {Node} node * @param {Object} options * @return {Function|null}

(node, options)

Source from the content-addressed store, hash-verified

7091 */
7092
7093 function compileNode(node, options) {
7094 var type = node.nodeType;
7095 if (type === 1 && !isScript(node)) {
7096 return compileElement(node, options);
7097 } else if (type === 3 && node.data.trim()) {
7098 return compileTextNode(node, options);
7099 } else {
7100 return null;
7101 }
7102 }
7103
7104 /**
7105 * Compile an element and return a nodeLinkFn.

Callers 2

compileFunction · 0.70
compileNodeListFunction · 0.70

Calls 3

isScriptFunction · 0.70
compileElementFunction · 0.70
compileTextNodeFunction · 0.70

Tested by

no test coverage detected