Skip to content

Commit

Permalink
Merge pull request #40 from migig/patch-1
Browse files Browse the repository at this point in the history
Same changes as to base project
  • Loading branch information
lipis committed Jun 19, 2015
2 parents 59a28b6 + 9064793 commit 5433779
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/sweet-alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,14 +726,14 @@
sweetAlertInitialize();
} else {
if (document.addEventListener) {
document.addEventListener('DOMContentLoaded', function factorial() {
document.removeEventListener('DOMContentLoaded', arguments.callee, false);
document.addEventListener('DOMContentLoaded', function handler() {
document.removeEventListener('DOMContentLoaded', handler, false);
sweetAlertInitialize();
}, false);
} else if (document.attachEvent) {
document.attachEvent('onreadystatechange', function() {
document.attachEvent('onreadystatechange', function handler() {
if (document.readyState === 'complete') {
document.detachEvent('onreadystatechange', arguments.callee);
document.detachEvent('onreadystatechange', handler);
sweetAlertInitialize();
}
});
Expand Down

0 comments on commit 5433779

Please sign in to comment.