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

Method clone

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

Source from the content-addressed store, hash-verified

1144 }
1145
1146 clone(): Tree {
1147 let newTree = new Tree();
1148 for (let node of this.traverse()) {
1149 newTree.addTreeNode(node.scopeRef, node.parent?.scopeRef ?? null, node.nodeToRestore);
1150 }
1151 return newTree;
1152 }
1153}
1154
1155class TreeNode {

Callers

nothing calls this directly

Calls 2

traverseMethod · 0.95
addTreeNodeMethod · 0.95

Tested by

no test coverage detected