File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ await Exceptionless.startup((c) => {
33
33
c . settings [ "@@error:MediaError" ] = "Off" ;
34
34
} ) ;
35
35
36
- document . addEventListener ( "DOMContentLoaded" , ( ) => {
36
+ const registerEventHandlers = ( ) => {
37
37
const elements = document . querySelectorAll ( ".submit-log" ) ;
38
38
for ( const element of elements ) {
39
39
element . addEventListener ( "click" , ( event ) => {
@@ -227,7 +227,7 @@ document.addEventListener("DOMContentLoaded", () => {
227
227
228
228
log . info ( `Pruning large object took ${ end - start } milliseconds` ) ;
229
229
} ) ;
230
- } ) ;
230
+ } ;
231
231
232
232
async function throwIndexOutOfRange ( indexer , withCustomStacking ) {
233
233
try {
@@ -286,3 +286,9 @@ class CustomError extends Error {
286
286
throw new Error ( "Not Implemented" ) ;
287
287
}
288
288
}
289
+
290
+ if ( document . readyState === "loading" ) {
291
+ document . addEventListener ( 'DOMContentLoaded' , registerEventHandlers ) ;
292
+ } else {
293
+ registerEventHandlers ( ) ;
294
+ }
You can’t perform that action at this time.
0 commit comments