MCPcopy Create free account
hub / github.com/dashnowords/imfe / createPatchFunction

Function createPatchFunction

chapter17/vue.js:5845–6561  ·  view source on GitHub ↗
(backend)

Source from the content-addressed store, hash-verified

5843 }
5844
5845 function createPatchFunction (backend) {
5846 var i, j;
5847 var cbs = {};
5848
5849 var modules = backend.modules;
5850 var nodeOps = backend.nodeOps;
5851
5852 for (i = 0; i < hooks.length; ++i) {
5853 cbs[hooks[i]] = [];
5854 for (j = 0; j < modules.length; ++j) {
5855 if (isDef(modules[j][hooks[i]])) {
5856 cbs[hooks[i]].push(modules[j][hooks[i]]);
5857 }
5858 }
5859 }
5860
5861 function emptyNodeAt (elm) {
5862 return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
5863 }
5864
5865 function createRmCb (childElm, listeners) {
5866 function remove$$1 () {
5867 if (--remove$$1.listeners === 0) {
5868 removeNode(childElm);
5869 }
5870 }
5871 remove$$1.listeners = listeners;
5872 return remove$$1
5873 }
5874
5875 function removeNode (el) {
5876 var parent = nodeOps.parentNode(el);
5877 // element may have already been removed due to v-html / v-text
5878 if (isDef(parent)) {
5879 nodeOps.removeChild(parent, el);
5880 }
5881 }
5882
5883 function isUnknownElement$$1 (vnode, inVPre) {
5884 return (
5885 !inVPre &&
5886 !vnode.ns &&
5887 !(
5888 config.ignoredElements.length &&
5889 config.ignoredElements.some(function (ignore) {
5890 return isRegExp(ignore)
5891 ? ignore.test(vnode.tag)
5892 : ignore === vnode.tag
5893 })
5894 ) &&
5895 config.isUnknownElement(vnode.tag)
5896 )
5897 }
5898
5899 var creatingElmInVPre = 0;
5900
5901 function createElm (
5902 vnode,

Callers 1

vue.jsFile · 0.85

Calls 15

isDefFunction · 0.85
makeMapFunction · 0.85
isUndefFunction · 0.85
invokeDestroyHookFunction · 0.85
createElmFunction · 0.85
sameVnodeFunction · 0.85
patchVnodeFunction · 0.85
isTrueFunction · 0.85
hydrateFunction · 0.85
invokeInsertHookFunction · 0.85
warnFunction · 0.85
emptyNodeAtFunction · 0.85

Tested by

no test coverage detected