MCPcopy Index your code
hub / github.com/adobe/react-spectrum / formatTargetNode

Function formatTargetNode

packages/@react-aria/test-utils/src/utils.ts:50–55  ·  view source on GitHub ↗
(value: number | string | HTMLElement)

Source from the content-addressed store, hash-verified

48}
49
50export function formatTargetNode(value: number | string | HTMLElement): string {
51 if (typeof HTMLElement !== 'undefined' && value instanceof HTMLElement) {
52 return (value.cloneNode(false) as HTMLElement).outerHTML;
53 }
54 return String(value);
55}
56
57/**
58 * Simulates a "long press" event on a element.

Callers 15

toggleOptionSelectionMethod · 0.90
triggerTabMethod · 0.90
toggleOptionSelectionMethod · 0.90
triggerRadioMethod · 0.90
toggleOptionSelectionMethod · 0.90
openSubmenuMethod · 0.90
toggleRowSelectionMethod · 0.90
toggleRowExpansionMethod · 0.90
triggerRowActionMethod · 0.90
toggleRowSelectionMethod · 0.90
toggleRowExpansionMethod · 0.90
triggerRowActionMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected