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

Function removeAndInvokeRemoveHook

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

Source from the content-addressed store, hash-verified

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