avoid reporting the DOM layout while it is loading

This commit is contained in:
gorhill 2015-07-06 10:24:28 -04:00
parent 4ad22d6f92
commit 497eb87fb0
1 changed files with 5 additions and 0 deletions

View File

@ -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);