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