From aeb4c3850b2db1827cef4d3ec82fda853879e160 Mon Sep 17 00:00:00 2001 From: SergioCrisostomo Date: Mon, 19 Jan 2015 23:20:06 +0100 Subject: [PATCH] fix 2682, add extra check for already ready DOM add a `if (!ready) check();` for cases when MooTools is added to a page that is already loaded. --- Source/Utilities/DOMReady.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Utilities/DOMReady.js b/Source/Utilities/DOMReady.js index 4ba7c6397..dc484cc30 100644 --- a/Source/Utilities/DOMReady.js +++ b/Source/Utilities/DOMReady.js @@ -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){