MCPcopy Create free account
hub / github.com/adobe/react-spectrum / clone

Method clone

packages/react-aria/src/focus/FocusScope.tsx:1097–1103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1095 }
1096
1097 clone(): Tree {
1098 let newTree = new Tree();
1099 for (let node of this.traverse()) {
1100 newTree.addTreeNode(node.scopeRef, node.parent?.scopeRef ?? null, node.nodeToRestore);
1101 }
1102 return newTree;
1103 }
1104}
1105
1106class TreeNode {

Callers

nothing calls this directly

Calls 2

traverseMethod · 0.95
addTreeNodeMethod · 0.95

Tested by

no test coverage detected