From 497eb87fb0fd719f7c08785b380d6fe91d8bd017 Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 6 Jul 2015 10:24:28 -0400 Subject: [PATCH] avoid reporting the DOM layout while it is loading --- src/js/scriptlets/dom-inspector.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/scriptlets/dom-inspector.js b/src/js/scriptlets/dom-inspector.js index fc8f72e96..e9bfc2de3 100644 --- a/src/js/scriptlets/dom-inspector.js +++ b/src/js/scriptlets/dom-inspector.js @@ -503,6 +503,11 @@ var domLayout = (function() { hostname: window.location.hostname }; + if ( document.readyState !== 'complete' ) { + response.status = 'busy'; + return response; + } + // No mutation observer means we need to send full layout if ( mutationObserver === null ) { mutationObserver = new MutationObserver(onMutationObserved);