()
| 1256 | } |
| 1257 | |
| 1258 | export 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 |
| 1271 | export function getIfReloadedAndProfiling(): boolean { |
no test coverage detected