cloneVNode() — vue Function Reference
Architecture documentation for the cloneVNode() function in vnode.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 2b480f91_488c_bfa4_7085_e63a0fe90255["cloneVNode()"] b3eb57d2_7ca7_2fcb_4cb5_33fb60eda979["cloneAndMarkFunctionalResult()"] b3eb57d2_7ca7_2fcb_4cb5_33fb60eda979 -->|calls| 2b480f91_488c_bfa4_7085_e63a0fe90255 b5b9b2bc_af65_0b4d_18a8_d754e24c79b1["createPatchFunction()"] b5b9b2bc_af65_0b4d_18a8_d754e24c79b1 -->|calls| 2b480f91_488c_bfa4_7085_e63a0fe90255 style 2b480f91_488c_bfa4_7085_e63a0fe90255 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/core/vdom/vnode.ts lines 95–119
export function cloneVNode(vnode: VNode): VNode {
const cloned = new VNode(
vnode.tag,
vnode.data,
// #7975
// clone children array to avoid mutating original in case of cloning
// a child.
vnode.children && vnode.children.slice(),
vnode.text,
vnode.elm,
vnode.context,
vnode.componentOptions,
vnode.asyncFactory
)
cloned.ns = vnode.ns
cloned.isStatic = vnode.isStatic
cloned.key = vnode.key
cloned.isComment = vnode.isComment
cloned.fnContext = vnode.fnContext
cloned.fnOptions = vnode.fnOptions
cloned.fnScopeId = vnode.fnScopeId
cloned.asyncMeta = vnode.asyncMeta
cloned.isCloned = true
return cloned
}
Domain
Subdomains
Source
Frequently Asked Questions
What does cloneVNode() do?
cloneVNode() is a function in the vue codebase.
What calls cloneVNode()?
cloneVNode() is called by 2 function(s): cloneAndMarkFunctionalResult, createPatchFunction.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free