blob: f372bd6f4f88468ae67a4b5139346461c8d35628 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<!DOCTYPE html>
<script>
self.addEventListener('message', function(e) {
// Send paint-timing entries upon receiving a message.
const paintEntries = performance.getEntriesByType('paint');
let entryContents = paintEntries.length + '';
for (let i = 0; i < paintEntries.length; i++) {
const entry = paintEntries[i];
entryContents += ' ' + entry.entryType + ' ' + entry.name;
}
parent.postMessage(entryContents, '*');
});
</script>
|