chromium/content/test/data/paste_listener.html

<title>Waiting for paste</title>
<body>
<script>
document.body.contentEditable = true;
document.body.addEventListener('paste', (event) => {
  Array.prototype.forEach.call(event.clipboardData.items, (item) => {
    if (item.type != 'text/rtf') {
      return;
    }
    item.getAsString((s) => {
      document.title = s;
    });
  });
});
</script>