blob: 838bbe7f0aae9f06dd99e620c171be40a0372ca7 [file] [log] [blame]
<!--
* Copyright 2015 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<script>
window.addEventListener('message', function(e) {
window.console.log('post message received.');
var data = JSON.parse(e.data);
if (data.length == 1 && data[0] === 'ping') {
e.source.postMessage(JSON.stringify(['pong']), '*');
}
});
</script>