1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15

android_webview / test / data / post_message_with_ports.html [blame]

<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>