[paint-timing]

Hello Everyone.

in the https://w3c.github.io/paint-timing/ draft , I found an error.

In the 1.1. Usage example section, The last line of comment code is wrong.


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"]});

The comment code should be changed to the following:


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 paint timing notifications
observer.observe({entryTypes: ["paint"]});

Received on Tuesday, 21 August 2018 11:21:05 UTC