https://github.com/web-platform-tests/wpt
Raw File
Tip revision: c952312a927eb56c33bf72d2062c6986cac96ff0 authored by Darwin Huang on 26 December 2018, 21:55:09 UTC
Async Clipboard Refactor: Update tests to use arrow functions
Tip revision: c952312
subframe-sending-paint.html
<!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>
back to top