Skip to content

Commit

Permalink
Add a later listener on 'load' to retry init incase it didn't run on …
Browse files Browse the repository at this point in the history
…DOMContentLoaded
  • Loading branch information
pattonwebz committed Dec 9, 2024
1 parent 7eaf5f4 commit 771d683
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/frontendHighlighterApp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -907,3 +907,7 @@ const initHighlighter = () => {
window.addEventListener( 'DOMContentLoaded', () => {
initHighlighter();
} );
// Add a listener later than DOMCOntentLoaded to check if the init has run.
window.addEventListener( 'load', () => {
initHighlighter();
} );

0 comments on commit 771d683

Please sign in to comment.