Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.onreadystatechange = function () {
- console.log("content script was fired onreadystatechange ");
- class PageMeasurement {
- constructor(url) {
- this.url = url;
- this.date = Date.now();
- var t = window.performance.timing;
- this.pageLoadTime = (t.loadEventEnd - t.fetchStart);
- this.renderTime = (t.loadEventEnd - t.responseEnd);
- }
- }
- if (document.readyState === 'complete') {
- console.log("document.readyState === complete")
- var page = new PageMeasurement(document.URL);
- console.log("page.renderTime", page.renderTime);
- }
- }
Add Comment
Please, Sign In to add comment