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

Function reactivateComponent

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

Source from the content-addressed store, hash-verified

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

Callers 1

createComponentFunction · 0.70

Calls 2

isDefFunction · 0.70
insertFunction · 0.70

Tested by

no test coverage detected