Skip to content

samarpanda/paint-timing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Browser Performance Paint Timing

JavaScript library for measuring Paint Timings in the browser that supports.

Usage

  1. Using import
<script type="module" src="./src/paint-timing.js"></script>
<script>
import {onPaintCaptured} from './src/paint-timing';
onPaintCaptured((fp, fcp, pta) => {
  console.log(fp, fcp, pta);
});
</script>
  1. With global variable
<script type="text/javascript" src="src/pt.js" /><script>
<script>
perfMetrics.onPtCaptured(function(fp, fcp, tArr){
  console.log(`FP: ${fp}, FCP: ${fcp}`)
  console.log(tArr)
})
</script>

About

Browser performance paint timing api

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published