aboutsummaryrefslogtreecommitdiff
path: root/contexts/data/lib/closure-library/closure/goog/demos/xpc/index.html
blob: e516ef26e6c4d8223723e5df61c8c6eb16ba703e (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<html>
<!--
Copyright 2010 The Closure Library Authors. All Rights Reserved.

Use of this source code is governed by the Apache License, Version 2.0.
See the COPYING file for details.
-->
<head>

<script src="../../base.js"></script>
<script src="xpcdemo.js"></script>
<script>
  if (!window.location.href.match(/suppressinit/)) {
    initOuter();
  }
</script>

<style type="text/css">
body, td {
  background-color: #eeeeff;
  font-family: arial,verdana,sans-serif;
  font-size: 12px;
}
</style>
</head>
<body>


<table border=0 width="100%" height="100%"><tr><td width="50%" valign="top">


<p>
this page: <b><script type="text/javascript">document.write(location.href)</script></b>
</p>

<p>See <a href="http://wiki/Main/CrossPageChannel">CrossPageChannel</a> and
<a href="http://wiki/Main/CrossDomainCommunication">CrossDomainCommunication</a> for details</a></p>

<p>
select transport:<br/>
<a href="?">Auto</a> |
<a href="?tp=1">Native messaging</a> |
<a href="?tp=2">Frame element method</a> |
<a href="?tp=3">Iframe relay</a> |
<a href="?tp=4">Iframe polling</a> |
<!--a href="?tp=5">Flash</a-->
<a href="?tp=6">Fragment URL</a>
<p/>

<div id="inactive">
  <input type="button" onclick="xpcdemo.initOuter();" value="create peer"/><br/>
</div>

<div id="active" style="display:none";>

<input type="button" onclick="xpcdemo.teardown();" value="destroy peer"/><br/>
<input type="button" onclick="xpcdemo.peerIframe.parentNode.removeChild(xpcdemo.peerIframe);" value="remove iframe"/> (without letting the channel know!)<br/>
<br/>

<input type="button" value="ping" onclick="xpcdemo.ping();"/><br/>
<input type="button" value="send n msgs" onclick="numMsgs = parseInt(document.getElementById('num').value); xpcdemo.sendN(isNaN(numMsgs) ? 10 : numMsgs);"/>
(n = <input type="text" size=3 value=10 id="num" />)<br/>

mousemove-forwarding:
<input type="button" onclick="xpcdemo.startMousemoveForwarding();" value="start"/>
<input type="button" onclick="xpcdemo.stopMousemoveForwarding();" value="stop"/>
<div id="clickfwd" style="padding:5px; width:200px; cursor:pointer; border: 1px #000000 solid;">Click me!</div>
<br/>

<input id="msgtext" type="text" value="Hello from outer frame." style="width:200px"/>
<input type="button" value="Send" onclick="xpcdemo.channel.send('log', document.getElementById('msgtext').value);"/>

</div>

<br/><br/>
Out [<a href="#" onclick="document.getElementById('console').innerHTML = ''; return false;">clear</a>]: <br/>
<div id="console" style="border:1px #000000 solid;"></div>



</td><td width="50%" valign="top" id="iframeContainer">


</td></tr></table>



</body>
</html>