MCPcopy Index your code
hub / github.com/TruthHun/BookStack / removeAndInvokeRemoveHook

Function removeAndInvokeRemoveHook

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

Source from the content-addressed store, hash-verified

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