chromium/android_webview/test/data/post_message_with_ports.html

<html>
  <head>
    <script>
      let channel = new MessageChannel();
      myObject.postMessage("Hello", [channel.port1]);

      channel.port2.onmessage = function(e) {
        document.title = e.data;
      }
    </script>
  </head>
  <body>
    <div>post message with ports</div>
  </body>
</html>