OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 chrome.app.runtime.onLaunched.addListener(function() { |
| 6 var webview = document.createElement('webview'); |
| 7 webview.src = 'data:text/html,<html><body>hello world</body></html>'; |
| 8 webview.addEventListener('close', function() {}); |
| 9 webview.contextMenus.onClicked.addListener(function() {}); |
| 10 webview.contextMenus.onShow.addListener(function() {}); |
| 11 webview.contextMenus.create({title: 'a', onclick: function() {}}); |
| 12 webview.addEventListener('loadabort', () => { chrome.test.notifyFail(); }); |
| 13 webview.addEventListener('loadstop', () => { chrome.test.notifyPass(); }); |
| 14 webview.request.onMessage.addListener(function() {}); |
| 15 document.body.appendChild(webview); |
| 16 }); |
OLD | NEW |