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

Function createElm

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

Source from the content-addressed store, hash-verified

4585
4586 var inPre = 0;
4587 function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {
4588 vnode.isRootInsert = !nested; // for transition enter check
4589 if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
4590 return
4591 }
4592
4593 var data = vnode.data;
4594 var children = vnode.children;
4595 var tag = vnode.tag;
4596 if (isDef(tag)) {
4597 {
4598 if (data && data.pre) {
4599 inPre++;
4600 }
4601 if (
4602 !inPre &&
4603 !vnode.ns &&
4604 !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) &&
4605 config.isUnknownElement(tag)
4606 ) {
4607 warn(
4608 'Unknown custom element: <' + tag + '> - did you ' +
4609 'register the component correctly? For recursive components, ' +
4610 'make sure to provide the "name" option.',
4611 vnode.context
4612 );
4613 }
4614 }
4615 vnode.elm = vnode.ns
4616 ? nodeOps.createElementNS(vnode.ns, tag)
4617 : nodeOps.createElement(tag, vnode);
4618 setScope(vnode);
4619
4620 /* istanbul ignore if */
4621 {
4622 createChildren(vnode, children, insertedVnodeQueue);
4623 if (isDef(data)) {
4624 invokeCreateHooks(vnode, insertedVnodeQueue);
4625 }
4626 insert(parentElm, vnode.elm, refElm);
4627 }
4628
4629 if ("development" !== 'production' && data && data.pre) {
4630 inPre--;
4631 }
4632 } else if (isTrue(vnode.isComment)) {
4633 vnode.elm = nodeOps.createComment(vnode.text);
4634 insert(parentElm, vnode.elm, refElm);
4635 } else {
4636 vnode.elm = nodeOps.createTextNode(vnode.text);
4637 insert(parentElm, vnode.elm, refElm);
4638 }
4639 }
4640
4641 function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
4642 var i = vnode.data;

Callers 4

createChildrenFunction · 0.70
addVnodesFunction · 0.70
updateChildrenFunction · 0.70
createPatchFunctionFunction · 0.70

Calls 8

createComponentFunction · 0.70
isDefFunction · 0.70
setScopeFunction · 0.70
createChildrenFunction · 0.70
invokeCreateHooksFunction · 0.70
insertFunction · 0.70
isTrueFunction · 0.70
warnFunction · 0.50

Tested by

no test coverage detected