1 // Copyright (c) 2012 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 chrome.browserAction.onClicked.addListener(function() {
6 var iframe = document.getElementById('theFrame');
9 context: {thing: 'world'}
11 iframe.contentWindow.postMessage(message, '*');
15 window.addEventListener('message', function(event) {
16 if (event.data.html) {
17 var notification = webkitNotifications.createNotification(
20 'HTML Received for "' + event.data.name + '": `' + event.data.html + '`'