aboutsummaryrefslogtreecommitdiff
path: root/contexts/data/lib/closure-library/closure/goog/messaging/testdata/portchannel_inner.html
blob: 6c9a09e489608eb362c0a9ae5b27aa6b7a448be2 (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
<!DOCTYPE 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>
<title>PortChannel test inner document</title>
<script src="../../base.js"></script>
<script>
goog.require('goog.messaging.PortChannel');
</script>
</head>
<body>
<script>

var channel = goog.messaging.PortChannel.forGlobalWindow('*');
channel.registerService('ping', function(msg) {
  channel.send('pong', msg);
});

</script>
</body>
</html>