inner.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <html>
  2. <!--
  3. Copyright 2010 The Closure Library Authors. All Rights Reserved.
  4. Use of this source code is governed by the Apache License, Version 2.0.
  5. See the COPYING file for details.
  6. -->
  7. <head>
  8. <script src="../../base.js"></script>
  9. <script src="xpcdemo.js"></script>
  10. <script>
  11. initInner();
  12. var code = '';
  13. function evalPrompt() {
  14. code = prompt('eval:', code);
  15. eval(code);
  16. };
  17. </script>
  18. <style type="text/css">
  19. body {
  20. background-color: #ffeac0;
  21. font-family: arial,verdana,sans-serif;
  22. font-size: 12px;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. <p>this page: <b><script type="text/javascript">document.write(location.href)</script></b></p>
  28. <input type="button" value="ping" onclick="xpcdemo.ping();"/><br/>
  29. <input type="button" value="send n msgs" onclick="numMsgs = parseInt(document.getElementById('num').value); xpcdemo.sendN(isNaN(numMsgs) ? 10 : numMsgs);"/>
  30. (n = <input type="text" size=3 value=10 id="num" />)<br/>
  31. mousemove-forwarding:
  32. <input type="button" onclick="xpcdemo.startMousemoveForwarding();" value="start"/>
  33. <input type="button" onclick="xpcdemo.stopMousemoveForwarding();" value="stop"/>
  34. <div id="clickfwd" style="padding:5px; width:200px; cursor:pointer; border: 1px #000000 solid;">Click me!</div>
  35. <br/>
  36. <input id="msgtext" type="text" value="Hello from inner frame." style="width:200px"/>
  37. <input type="button" value="Send" onclick="xpcdemo.channel.send('log', document.getElementById('msgtext').value);"/>
  38. <br/>
  39. <br/>
  40. <input type="button" value="eval" text="eval()" onclick="evalPrompt();"/>
  41. <br/><br/>
  42. Out [<a href="#" onclick="document.getElementById('console').innerHTML = ''; return false;">clear</a>]: <br/>
  43. <div id="console" style="border:1px #000000 solid;"></div>
  44. </body>
  45. </html>