MCPcopy
hub / github.com/react/react / getIsReloadAndProfileSupported

Function getIsReloadAndProfileSupported

packages/react-devtools-shared/src/utils.js:1258–1268  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1256}
1257
1258export function getIsReloadAndProfileSupported(): boolean {
1259 // Notify the frontend if the backend supports the Storage API (e.g. localStorage).
1260 // If not, features like reload-and-profile will not work correctly and must be disabled.
1261 let isBackendStorageAPISupported = false;
1262 try {
1263 localStorage.getItem('test');
1264 isBackendStorageAPISupported = true;
1265 } catch (error) {}
1266
1267 return isBackendStorageAPISupported && isSynchronousXHRSupported();
1268}
1269
1270// Expected to be used only by browser extension and react-devtools-inline
1271export function getIfReloadedAndProfiling(): boolean {

Callers 4

finishActivationFunction · 0.90
connectToDevToolsFunction · 0.90
activateBackendFunction · 0.90

Calls 1

Tested by

no test coverage detected