Home / Function/ cloneAndMarkFunctionalResult() — vue Function Reference

cloneAndMarkFunctionalResult() — vue Function Reference

Architecture documentation for the cloneAndMarkFunctionalResult() function in create-functional-component.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  b3eb57d2_7ca7_2fcb_4cb5_33fb60eda979["cloneAndMarkFunctionalResult()"]
  c4732d15_fd52_2b9b_6d6d_65e127972dda["createFunctionalComponent()"]
  c4732d15_fd52_2b9b_6d6d_65e127972dda -->|calls| b3eb57d2_7ca7_2fcb_4cb5_33fb60eda979
  2b480f91_488c_bfa4_7085_e63a0fe90255["cloneVNode()"]
  b3eb57d2_7ca7_2fcb_4cb5_33fb60eda979 -->|calls| 2b480f91_488c_bfa4_7085_e63a0fe90255
  style b3eb57d2_7ca7_2fcb_4cb5_33fb60eda979 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/vdom/create-functional-component.ts lines 153–174

function cloneAndMarkFunctionalResult(
  vnode,
  data,
  contextVm,
  options,
  renderContext
) {
  // #7817 clone node before setting fnContext, otherwise if the node is reused
  // (e.g. it was from a cached normal slot) the fnContext causes named slots
  // that should not be matched to match.
  const clone = cloneVNode(vnode)
  clone.fnContext = contextVm
  clone.fnOptions = options
  if (__DEV__) {
    ;(clone.devtoolsMeta = clone.devtoolsMeta || ({} as any)).renderContext =
      renderContext
  }
  if (data.slot) {
    ;(clone.data || (clone.data = {})).slot = data.slot
  }
  return clone
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does cloneAndMarkFunctionalResult() do?
cloneAndMarkFunctionalResult() is a function in the vue codebase.
What does cloneAndMarkFunctionalResult() call?
cloneAndMarkFunctionalResult() calls 1 function(s): cloneVNode.
What calls cloneAndMarkFunctionalResult()?
cloneAndMarkFunctionalResult() is called by 1 function(s): createFunctionalComponent.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free