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

Function reactivateComponent

static/vuejs/vue.common.js:4689–4709  ·  view source on GitHub ↗
(vnode, insertedVnodeQueue, parentElm, refElm)

Source from the content-addressed store, hash-verified

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

Callers 1

createComponentFunction · 0.70

Calls 2

isDefFunction · 0.70
insertFunction · 0.70

Tested by

no test coverage detected