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

Function removeAndInvokeRemoveHook

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

Source from the content-addressed store, hash-verified

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