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

Function setScope

static/vuejs/vue.runtime.common.js:4748–4763  ·  view source on GitHub ↗
(vnode)

Source from the content-addressed store, hash-verified

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