chromium/third_party/blink/web_tests/external/wpt/workers/multi-globals/incumbent/incumbent.html

<!DOCTYPE html>
<meta charset=utf-8>
<title>Incumbent page</title>

<iframe src="../current/current.html" id="c"></iframe>

<script>
  const current = document.querySelector("#c").contentWindow;

  window.hello = () => {
    const worker = new current.Worker('worker.js');
    worker.onmessage = e => { parent.postMessage(e.data, '*'); }
  };
</script>