MCPcopy Create free account
hub / github.com/TruthHun/BookStack / removeAndInvokeRemoveHook

Function removeAndInvokeRemoveHook

static/vuejs/vue.common.js:4803–4829  ·  view source on GitHub ↗
(vnode, rm)

Source from the content-addressed store, hash-verified

4801 }
4802
4803 function removeAndInvokeRemoveHook (vnode, rm) {
4804 if (isDef(rm) || isDef(vnode.data)) {
4805 var listeners = cbs.remove.length + 1;
4806 if (isDef(rm)) {
4807 // we have a recursively passed down rm callback
4808 // increase the listeners count
4809 rm.listeners += listeners;
4810 } else {
4811 // directly removing
4812 rm = createRmCb(vnode.elm, listeners);
4813 }
4814 // recursively invoke hooks on child component root node
4815 if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
4816 removeAndInvokeRemoveHook(i, rm);
4817 }
4818 for (i = 0; i < cbs.remove.length; ++i) {
4819 cbs.remove[i](vnode, rm);
4820 }
4821 if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
4822 i(vnode, rm);
4823 } else {
4824 rm();
4825 }
4826 } else {
4827 removeNode(vnode.elm);
4828 }
4829 }
4830
4831 function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
4832 var oldStartIdx = 0;

Callers 1

removeVnodesFunction · 0.70

Calls 5

isDefFunction · 0.70
createRmCbFunction · 0.70
iFunction · 0.70
removeNodeFunction · 0.70
rmFunction · 0.50

Tested by

no test coverage detected