Skip to content

Commit

Permalink
Defer File Highlight until the full DOM has loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswells0 committed Dec 29, 2015
1 parent 292cebd commit 6f995ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/file-highlight/prism-file-highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@

};

self.Prism.fileHighlight();
if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', self.Prism.fileHighlight);
} else {
self.Prism.fileHighlight();
}

})();

0 comments on commit 6f995ef

Please sign in to comment.