1 // Copyright 2014 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 window.addEventListener('message', function(e) {
7 var data = JSON.parse(e.data);
9 if (data[0] == 'visibilityState-request') {
10 response = document.visibilityState;
16 JSON.stringify(['visibilityState-response', response]), '*');