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

Function removeAndInvokeRemoveHook

static/vuejs/vue.esm.js:4801–4827  ·  view source on GitHub ↗
(vnode, rm)

Source from the content-addressed store, hash-verified

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