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

Function createElm

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

Source from the content-addressed store, hash-verified

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