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

Function reactivateComponent

static/vuejs/vue.esm.js:4687–4707  ·  view source on GitHub ↗
(vnode, insertedVnodeQueue, parentElm, refElm)

Source from the content-addressed store, hash-verified

4685 }
4686
4687 function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
4688 var i;
4689 // hack for #4339: a reactivated component with inner transition
4690 // does not trigger because the inner node's created hooks are not called
4691 // again. It's not ideal to involve module-specific logic in here but
4692 // there doesn't seem to be a better way to do it.
4693 var innerNode = vnode;
4694 while (innerNode.componentInstance) {
4695 innerNode = innerNode.componentInstance._vnode;
4696 if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
4697 for (i = 0; i < cbs.activate.length; ++i) {
4698 cbs.activate[i](emptyNode, innerNode);
4699 }
4700 insertedVnodeQueue.push(innerNode);
4701 break
4702 }
4703 }
4704 // unlike a newly created component,
4705 // a reactivated keep-alive component doesn't insert itself
4706 insert(parentElm, vnode.elm, refElm);
4707 }
4708
4709 function insert (parent, elm, ref) {
4710 if (isDef(parent)) {

Callers 1

createComponentFunction · 0.70

Calls 2

isDefFunction · 0.70
insertFunction · 0.70

Tested by

no test coverage detected