title: How to pass a File object via postMessage or any similar function
body: <p>Is there any way to pass a <code>File</code> object via <code>postMessage</code> or any similar function?</p>
  
  <p>I need to communicate between page-related JS code and the one from content script as stated in the <a href="https://developer.chrome.com/extensions/content_scripts#host-page-communication" rel="nofollow">documentation</a>.</p>
  
  <p>If I try to pass it directly it gives me the following error:</p>
  
  <blockquote>
    <p>Uncaught DataCloneError: Failed to execute 'postMessage' on 'Window':
    An object could not be cloned</p>
  </blockquote>