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

Function createElement

packages/runtime-test/src/nodeOps.ts:74–93  ·  packages/runtime-test/src/nodeOps.ts::createElement
(tag: string)

Source from the content-addressed store, hash-verified

72}
73
74function createElement(tag: string): TestElement {
75 const node: TestElement = {
76 id: nodeId++,
77 type: TestNodeTypes.ELEMENT,
78 tag,
79 children: [],
80 props: {},
81 parentNode: null,
82 eventListeners: null,
83 }
84 logNodeOp({
85 type: NodeOpTypes.CREATE,
86 nodeType: TestNodeTypes.ELEMENT,
87 targetNode: node,
88 tag,
89 })
90 class="cm">// avoid test nodes from being observed
91 markRaw(node)
92 return node
93}
94
95function createText(text: string): TestText {
96 const node: TestText = {

Callers 3

setupFunction · 0.85
mountSuspenseFunction · 0.85
patchSuspenseFunction · 0.85

Calls 2

markRawFunction · 0.90
logNodeOpFunction · 0.85

Tested by

no test coverage detected