MCPcopy Index your code
hub / github.com/TruthHun/BookStack / createElm

Function createElm

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

Source from the content-addressed store, hash-verified

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