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

Function get

packages/@react-spectrum/s2/test/utils/dragAndDrop.ts:27–36  ·  view source on GitHub ↗
(target, prop)

Source from the content-addressed store, hash-verified

25
26 let proxy = new Proxy(dataTransfer, {
27 get(target, prop) {
28 if (prop in overrides) {
29 return overrides[prop as string];
30 }
31 let value = Reflect.get(target, prop, target);
32 if (typeof value === 'function') {
33 return value.bind(target);
34 }
35 return value;
36 },
37 set(target, prop, value) {
38 if (prop === 'effectAllowed' || prop === 'dropEffect') {
39 overrides[prop] = value;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected