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

Function cleanup

packages/react-aria/src/interactions/utils.ts:199–207  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

197 root.addEventListener('focus', onFocus, true);
198
199 let cleanup = () => {
200 cancelAnimationFrame(raf);
201 root.removeEventListener('blur', onBlur, true);
202 root.removeEventListener('focusout', onFocusOut, true);
203 root.removeEventListener('focusin', onFocusIn, true);
204 root.removeEventListener('focus', onFocus, true);
205 ignoreFocusEvent = false;
206 isRefocusing = false;
207 };
208
209 let raf = requestAnimationFrame(cleanup);
210 return cleanup;

Callers 15

domHelpers.test.jsFile · 0.85
FocusScope.test.jsFile · 0.85
onFocusOutFunction · 0.85
onFocusInFunction · 0.85
setStyleFunction · 0.85
mergeRefsFunction · 0.85
useOverlayPositionFunction · 0.85

Calls 1

removeEventListenerMethod · 0.80

Tested by

no test coverage detected