Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Maykonn committed Jul 26, 2018
1 parent a16de5b commit 1f0934b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/PageInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@ export default class PageInfo {
this.Time = new Time();
this.Errors = [];
this._Events = new EventsCollection(clientCallbacks);
this._elements = window.document.getElementsByTagName('*');
this._elementsNumber = this._elements.length;
this._loadedElementsNumber = 0;

this._errorObserver();
this._readyStateObserver();
this._mutationObserver();
this._analyzeDOM();
new Promise((resolve) => {
this._elements = window.document.getElementsByTagName('*');
this._elementsNumber = this._elements.length;
this._loadedElementsNumber = 0;

this._errorObserver();
this._readyStateObserver();
this._mutationObserver();

resolve();
}).then(() => {
this._analyzeDOM();
});
}

/**
Expand Down

0 comments on commit 1f0934b

Please sign in to comment.