title: sending Map to content script in chrome extension gives empty object
body: <p>I'm sending a map from my popup.js to content script but instead of a map I get an <code>[object Object]</code>. I tried using JSON.parse and JSON.stringify but I had a 'unexpected token O'.
  script for sending the map:</p>
  <pre><code>const mapObject=new Map();
  mapObject.set(&quot;key2&quot;,&quot;vakku&quot;);
  mapObject.set(&quot;key4&quot;,&quot;val4&quot;);
  chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
          chrome.tabs.sendMessage(tabs[0].id, {
            from: &quot;tpopup&quot;,
            command: &quot;specifyAccounts&quot;
          , tableData: mapObject,
          },function(message,sender,sendresponse){
           // stuff
          });
        });
  </code></pre>
  <p>and in the listener:</p>
  <pre><code>var dataset = msg.tableData;
         var datasetJS= new Map(Object.entries(dataset));
          if(typeof datasetJS!=&quot;undefined&quot;){
            console.log(datasetJS.size);//0
            console.log(typeof datasetJS);//object
            console.log(datasetJS.toString());// [object Map]
            console.log(JSON.stringify(datasetJS));//{}
            console.log(typeof dataset);//object
            console.log(dataset.toString());[object Object]
  }
  </code></pre>
  <p>Any idea what went wrong? Thank you!</p>