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

Function setScope

static/vuejs/vue.common.js:4752–4767  ·  view source on GitHub ↗
(vnode)

Source from the content-addressed store, hash-verified

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