Elim cr-checkbox
[chromium-blink-merge.git] / chrome / test / data / webui / inject_comm_channel_2.js
blobb90cd94c8b5ca55d7e1dd94290aeff0ce3a46ee2
1 // Copyright 2015 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.
5 var embedder = null;
7 function reportConnected_request() {
8 var msg = ['connected_response'];
9 embedder.postMessage(JSON.stringify(msg), '*');
12 window.addEventListener('message', function(e) {
13 embedder = e.source;
14 var data = JSON.parse(e.data);
15 switch (data[0]) {
16 case 'connect_request': {
17 reportConnected_request();
18 break;
21 });