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

Function reactivateComponent

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

Source from the content-addressed store, hash-verified

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

Callers 1

createComponentFunction · 0.70

Calls 2

isDefFunction · 0.70
insertFunction · 0.70

Tested by

no test coverage detected