title: Failed to execute 'postMessage' on 'Worker': An OffscreenCanvas could not be cloned because it was detached
body: <p>I'm trying to run multiple instances of my web worker. But I'm getting the following error in browser console :</p>
  <blockquote>
  <p>core.js:4081 ERROR DOMException: Failed to execute 'postMessage' on 'Worker': An OffscreenCanvas could not be cloned because it was detached.</p>
  </blockquote>
  <p>Here is the Angular code :</p>
  <pre><code>let htmlCanvas = &lt;HTMLCanvasElement&gt; document.getElementById(&quot;canvas&quot;);
  let offscreen = htmlCanvas.transferControlToOffscreen();
  for(let i = 1; i &lt; 10; i++){
    let _worker = new Worker(&quot;./my-worker.worker&quot;, { type: 'module' }); 
    _worker.onmessage = ({ data }) =&gt; {
        console.log(data);
    };
    _worker.postMessage({canvas: offscreen, x_max : i * 100}, [offscreen]);
  }
  </code></pre>
  <p>The loop stops at second iteration with the above error in browser console.</p>