We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd65bd3 commit d49ce88Copy full SHA for d49ce88
plugins/optimization-detective/detect-loader.js
@@ -13,15 +13,6 @@ async function load( detectSrc, detectArgs ) {
13
const doc = document;
14
const win = window;
15
16
- // Ensure the DOM is loaded (although it surely already is since we're executing in a module).
17
- await new Promise( ( resolve ) => {
18
- if ( doc.readyState !== 'loading' ) {
19
- resolve();
20
- } else {
21
- doc.addEventListener( 'DOMContentLoaded', resolve, { once: true } );
22
- }
23
- } );
24
-
25
// Wait until the resources on the page have fully loaded.
26
await new Promise( ( resolve ) => {
27
if ( doc.readyState === 'complete' ) {
0 commit comments