title: how to send javascript object with postMessage API
body: <p>I've known node.js has crypto module(use openssl) to do the enc/decrypt(aes,ecc...) job. but don't know how to do it in browser.</p>
  
  <p>so we use the <a href="https://github.com/indutny/elliptic" rel="nofollow noreferrer">elliptic</a> package,and have pack it in a bundle.js and it worked fine in web.</p>
  
  <p>we want make it a chrome plugin。but I don't know how chrome plugin provide functions to user web page to call from.</p>
  
  <p>I used postMessage in content_script to send messages to user web page, but only can send json data, if I send it with a javascript object (the bundle.js object I pack with many enc functions).It will complains about 'could not be cloned' error。</p>
  
  <p><a href="https://i.stack.imgur.com/IjYDZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IjYDZ.jpg" alt="error"></a></p>