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

Function setScope

static/vuejs/vue.runtime.js:4742–4757  ·  view source on GitHub ↗
(vnode)

Source from the content-addressed store, hash-verified

4740 // this is implemented as a special case to avoid the overhead
4741 // of going through the normal attribute patching process.
4742 function setScope (vnode) {
4743 var i;
4744 var ancestor = vnode;
4745 while (ancestor) {
4746 if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
4747 nodeOps.setAttribute(vnode.elm, i, '');
4748 }
4749 ancestor = ancestor.parent;
4750 }
4751 // for slot content they should also get the scopeId from the host instance.
4752 if (isDef(i = activeInstance) &&
4753 i !== vnode.context &&
4754 isDef(i = i.$options._scopeId)) {
4755 nodeOps.setAttribute(vnode.elm, i, '');
4756 }
4757 }
4758
4759 function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
4760 for (; startIdx <= endIdx; ++startIdx) {

Callers 2

createElmFunction · 0.70
initComponentFunction · 0.70

Calls 2

isDefFunction · 0.70
setAttributeMethod · 0.45

Tested by

no test coverage detected