Skip to content

Commit

Permalink
fix 2682, add extra check for already ready DOM
Browse files Browse the repository at this point in the history
add a `if (!ready) check();`  for cases when MooTools is added to a page
that is already loaded.
  • Loading branch information
SergioCrisostomo committed Jan 19, 2015
1 parent 9adadae commit aeb4c38
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Source/Utilities/DOMReady.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ if ('onreadystatechange' in document) document.addListener('readystatechange', c
else shouldPoll = true;

if (shouldPoll) poll();
if (!ready) check();

Element.Events.domready = {
onAdd: function(fn){
Expand Down

0 comments on commit aeb4c38

Please sign in to comment.