Skip to content

Instantly share code, notes, and snippets.

@martinschierle
Created May 18, 2021 21:45
Show Gist options
  • Save martinschierle/11a77fe24cca301dbb463ef83c630313 to your computer and use it in GitHub Desktop.
Save martinschierle/11a77fe24cca301dbb463ef83c630313 to your computer and use it in GitHub Desktop.
let po = new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log(entry);
}
});
po.observe({type: 'layout-shift', buffered: true});
let po2 = new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log(entry);
}
});
po2.observe({ type: 'largest-contentful-paint', buffered: true});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment