Debian Codegraph @

closure-library/closure/goog/messaging/testdata/portchannel_wrong_origin_inner.html

raw
1 <!DOCTYPE html>
2 <html>
3 <!--
4 Copyright 2010 The Closure Library Authors. All Rights Reserved.
5
6 Use of this source code is governed by the Apache License, Version 2.0.
7 See the COPYING file for details.
8 -->
9 <!--
10 -->
11 <head>
12 <title>PortChannel test inner document</title>
13 <script src="../../base.js"></script>
14 <script>
15 goog.require('goog.messaging.PortChannel');
16 </script>
17 </head>
18 <body>
19 <script>
20
21 var channel = goog.messaging.PortChannel.forGlobalWindow(
22 'http://somewhere-else.com');
23 channel.registerService('ping', function(msg) {
24 channel.send('pong', msg);
25 });
26
27 </script>
28 </body>
29 </html>