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

Method clone

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

Source from the content-addressed store, hash-verified

1090 }
1091
1092 clone(): Tree {
1093 let newTree = new Tree();
1094 for (let node of this.traverse()) {
1095 newTree.addTreeNode(node.scopeRef, node.parent?.scopeRef ?? null, node.nodeToRestore);
1096 }
1097 return newTree;
1098 }
1099}
1100
1101class TreeNode {

Callers

nothing calls this directly

Calls 2

traverseMethod · 0.95
addTreeNodeMethod · 0.95

Tested by

no test coverage detected