Last active
April 27, 2016 05:27
-
-
Save summerwind/ea30077b55719dba5747 to your computer and use it in GitHub Desktop.
Revisions
-
summerwind revised this gist
Jun 11, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ var firstPaint = 0, firstPaintTime, paint; function paintHandler() { paint = window.performance.now() if (firstPaint === 0) { firstPaint = paint; firstPaintTime = firstPaint + window.performance.timing.navigationStart; window.performance.timing.firstPaint = firstPaint; window.performance.timing.firstPaintTime = firstPaintTime; } -
summerwind revised this gist
Jun 11, 2015 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ var firstPaint = 0; function paintHandler() { var paint = window.performance.now() if (firstPaint === 0) { firstPaint = paint; var firstPaintTime = firstPaint + window.performance.timing.navigationStart; window.performance.timing.firstPaint = firstPaint; window.performance.timing.firstPaintTime = firstPaintTime; } }; window.addEventListener("MozAfterPaint", paintHandler, false); -
summerwind created this gist
Jun 11, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ var firstPaint = 0, firstPaintTime; function paintHandler() { if (firstPaint === 0) { firstPaint = window.performance.now(); firstPaintTime = firstPaint + window.performance.timing.navigationStart; console.log("firstPaint", firstPaint); console.log("firstPaintTime", firstPaintTime); console.log(window.performance.timing); } }; window.addEventListener("MozAfterPaint", paintHandler, false);