Skip to content

Commit

Permalink
bootstrap - log an error when window config cannot be loaded in 10s (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jun 29, 2021
1 parent 090d8bc commit 158b9b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bootstrap-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@
});

// Await window configuration from preload
const timeout = setTimeout(() => { console.error(`[resolve window config] Could not resolve window configuration within 10 seconds, but will continue to wait...`); }, 10000);
performance.mark('code/willWaitForWindowConfig');
/** @type {ISandboxConfiguration} */
const configuration = await preloadGlobals.context.resolveConfiguration();
performance.mark('code/didWaitForWindowConfig');
clearTimeout(timeout);

// Signal DOM modifications are now OK
if (typeof options?.canModifyDOM === 'function') {
Expand Down

0 comments on commit 158b9b3

Please sign in to comment.