1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26

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

<html>

<head>
  <title>reply</title>
  <script>
    myObject.onmessage = function (event) {
      try {
        myObject.postMessage(null);
      } catch (e) {
        myObject.postMessage(e.toString());
      }
      try {
        myObject.postMessage(undefined);
      } catch (e) {
        myObject.postMessage(e.toString());
      }
    };
    myObject.postMessage("Hello");
  </script>
</head>

<body>
  <div>post message waiting for reply</div>
</body>

</html>