()
| 361 | } |
| 362 | |
| 363 | function createSuspensePanel() { |
| 364 | if (suspensePortalContainer) { |
| 365 | // Panel is created and user opened it at least once |
| 366 | ensureInitialHTMLIsCleared(suspensePortalContainer); |
| 367 | render('suspense'); |
| 368 | |
| 369 | return; |
| 370 | } |
| 371 | |
| 372 | if (suspensePanel) { |
| 373 | // Panel is created, but wasn't opened yet, so no document is present for it |
| 374 | return; |
| 375 | } |
| 376 | |
| 377 | chrome.devtools.panels.create( |
| 378 | __IS_CHROME__ || __IS_EDGE__ ? 'Suspense ⚛' : 'Suspense', |
| 379 | __IS_EDGE__ ? 'icons/production.svg' : '', |
| 380 | 'panel.html', |
| 381 | createdPanel => { |
| 382 | suspensePanel = createdPanel; |
| 383 | |
| 384 | createdPanel.onShown.addListener(portal => { |
| 385 | suspensePortalContainer = portal.container; |
| 386 | if (suspensePortalContainer != null && render) { |
| 387 | ensureInitialHTMLIsCleared(suspensePortalContainer); |
| 388 | |
| 389 | render('suspense'); |
| 390 | portal.injectStyles(cloneStyleTags); |
| 391 | |
| 392 | logEvent({event_name: 'selected-suspense-tab'}); |
| 393 | } |
| 394 | }); |
| 395 | }, |
| 396 | ); |
| 397 | } |
| 398 | |
| 399 | function performInTabNavigationCleanup() { |
| 400 | // Potentially, if react hasn't loaded yet and user performs in-tab navigation |
no test coverage detected