90 lines
2.6 KiB
HTML
90 lines
2.6 KiB
HTML
<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>
|