Source code

Revision control

Copy as Markdown

Other Tools

<!--
Any copyright is dedicated to the Public Domain.
-->
<!DOCTYPE html>
<html>
<body>
</body>
<script>
var promise = new Promise(resolve => {
var observer = new PerformanceObserver(list => resolve(list));
observer.observe({entryTypes: ["paint"]});
});
promise.then(list => {
var perfEntries = list.getEntries();
opener.is(list.getEntries().length, 1);
opener.isDeeply(list.getEntries(),
performance.getEntriesByType("paint"),
"Observed 'paint' entries should equal to entries obtained by getEntriesByType.");
opener.isDeeply(list.getEntries({name: "paint"}),
performance.getEntriesByName("paint"),
"getEntries with name filter should return correct results.");
opener.isDeeply(list.getEntries({entryType: "paint"}),
performance.getEntriesByType("paint"),
"getEntries with entryType filter should return correct results.");
opener.done();
});
const img = document.createElement("IMG");
document.body.appendChild(img);
</script>
</html>