Skip to content

Instantly share code, notes, and snippets.

@luxplanjay
Created July 4, 2018 09:26
Show Gist options
  • Save luxplanjay/6702178144b313cf695fa16a5f2fe582 to your computer and use it in GitHub Desktop.
Save luxplanjay/6702178144b313cf695fa16a5f2fe582 to your computer and use it in GitHub Desktop.
function getTimeToInteractive() {
const { requestStart, domInteractive } = window.performance.timing;
return requestStart - domInteractive;
}
function getResourceEntries() {
return window.performance.getEntriesByType('resource') || [];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment