Skip to content

Commit d49ce88

Browse files
committed
Remove redundant DCL event listener
1 parent cd65bd3 commit d49ce88

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

plugins/optimization-detective/detect-loader.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ async function load( detectSrc, detectArgs ) {
1313
const doc = document;
1414
const win = window;
1515

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-
2516
// Wait until the resources on the page have fully loaded.
2617
await new Promise( ( resolve ) => {
2718
if ( doc.readyState === 'complete' ) {

0 commit comments

Comments
 (0)