Home | History | Annotate | Download | only in chrome_frame
      1 <html>
      2 <!-- TODO(slightlyoff): Move to tests directory? -->
      3 <head>
      4 <title>Script test</title>
      5 <script>
      6 function msg(txt) {
      7   window.document.getElementById("my_text").innerText = txt;
      8 }
      9 
     10 function OnLoad() {
     11   var host = window.externalHost;
     12   host.ForwardMessageToExternalHost("OnChromeFrameMessage",
     13                                     "Hello from ChromeFrame");
     14 }
     15 
     16 function OnHostMessage(text) {
     17   msg("In ChromeFrame: \r\n Message from host: " + text);
     18 }
     19 </script>
     20 </head>
     21 <body onload="OnLoad();">
     22 Here's an edit field: <input type="text"><br>
     23 Here's another: <input type="text"><br>
     24 <p>
     25 Message:<br>
     26 <pre><div id="my_text"></div></pre>
     27 </p>
     28 </body>
     29 </html> 
     30