Created
June 17, 2017 08:21
-
-
Save JMPerez/64caddd67e86f15e4963cad2887ebfa2 to your computer and use it in GitHub Desktop.
Performance Observer example
This file contains 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 characters
var observer = new PerformanceObserver(function(list) { | |
var perfEntries = list.getEntries(); | |
for (var i = 0; i < perfEntries.length; i++) { | |
// Process entries | |
// report back for analytics and monitoring | |
// ... | |
} | |
}); | |
// register observer for long task notifications | |
observer.observe({entryTypes: ["paint"]}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment