Skip to content

Commit

Permalink
Switch to DOMContentLoaded to begin running scripts before a small st…
Browse files Browse the repository at this point in the history
…yle recalc
  • Loading branch information
progers committed Feb 27, 2016
1 parent 852ee24 commit 62176e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var currentFile;
var left, leftImageArea, leftTextarea, leftImageInput, leftTypeSelect, leftTypeText;
var right, rightTextarea, rightTypeSelect, rightTypeText;

window.onload = function() {
window.addEventListener('DOMContentLoaded', function() {
left = document.getElementById('left');
leftImageArea = left.querySelector('.imagearea');
leftTextarea = left.querySelector('textarea');
Expand Down Expand Up @@ -106,7 +106,7 @@ window.onload = function() {
setTimeout(function() {
setupOfflineCache();
}, 500);
}
});

function updateConversion() {
// Cleanup any leftover errors.
Expand Down

0 comments on commit 62176e1

Please sign in to comment.