OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 /* | |
Devlin
2016/12/22 17:04:32
nit: dead code?
lazyboy
2016/12/22 22:57:06
Removed.
| |
6 window.onload = function() { | |
7 window.parent.postMessage( | |
8 JSON.stringify(['loaded', 'local_frame.html']), '*'); | |
9 }; | |
10 */ | |
11 onmessage = function(e) { | |
12 var data = JSON.parse(e.data); | |
13 if (data[0] != 'ping') | |
14 return; | |
15 var param = data[1]; | |
16 e.source.postMessage(JSON.stringify(['pong', param]), '*'); | |
17 }; | |
OLD | NEW |