MCPcopy
hub / github.com/vuejs/core / createCommentVNode

Function createCommentVNode

packages/runtime-core/src/vnode.ts:777–786  ·  view source on GitHub ↗
(
  text: string = '',
  // when used as the v-else branch, the comment node must be created as a
  // block to ensure correct updates.
  asBlock: boolean = false,
)

Source from the content-addressed store, hash-verified

775 * @private
776 */
777export function createCommentVNode(
778 text: string = '',
779 // when used as the v-else branch, the comment node must be created as a
780 // block to ensure correct updates.
781 asBlock: boolean = false,
782): VNode {
783 return asBlock
784 ? (openBlock(), createBlock(Comment, null, text))
785 : createVNode(Comment, null, text)
786}
787
788export function normalizeVNode(child: VNodeChild): VNode {
789 if (child == null || typeof child === 'boolean') {

Callers 15

setupFunction · 0.90
renderFunction · 0.90
runSharedTestsFunction · 0.90
setupFunction · 0.90
renderSlot.spec.tsFile · 0.90
testRenderFunction · 0.85
renderFunction · 0.85
hydration.spec.tsFile · 0.85
setupFunction · 0.85
renderFunction · 0.85
setupFunction · 0.85
renderFnFunction · 0.85

Calls 2

openBlockFunction · 0.85
createBlockFunction · 0.70

Tested by 12

renderFunction · 0.72
runSharedTestsFunction · 0.72
setupFunction · 0.72
testRenderFunction · 0.68
renderFunction · 0.68
setupFunction · 0.68
renderFunction · 0.68
setupFunction · 0.68
renderFnFunction · 0.68
setupFunction · 0.68
renderFunction · 0.68
setupFunction · 0.68