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

Function setScope

static/vuejs/vue.esm.js:4750–4765  ·  view source on GitHub ↗
(vnode)

Source from the content-addressed store, hash-verified

4748 // this is implemented as a special case to avoid the overhead
4749 // of going through the normal attribute patching process.
4750 function setScope (vnode) {
4751 var i;
4752 var ancestor = vnode;
4753 while (ancestor) {
4754 if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
4755 nodeOps.setAttribute(vnode.elm, i, '');
4756 }
4757 ancestor = ancestor.parent;
4758 }
4759 // for slot content they should also get the scopeId from the host instance.
4760 if (isDef(i = activeInstance) &&
4761 i !== vnode.context &&
4762 isDef(i = i.$options._scopeId)) {
4763 nodeOps.setAttribute(vnode.elm, i, '');
4764 }
4765 }
4766
4767 function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
4768 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