Browse files

fixed tcpserver sample to work on webview instead of browsertag

  • Loading branch information...
1 parent d101579 commit 1dbf84fc0a126bd1051b0b719a9db82a58bff28d @mangini mangini committed Oct 29, 2012
View
4 tcpserver/commands/BrowserCommands.js
@@ -68,11 +68,11 @@ Commands.addCommand("echo",
Commands.addCommand("open",
"Open the given URL",
function(args) {
- chrome.app.window.create('commands/browsertag.html', {width: 600, height: 400},
+ chrome.app.window.create('commands/webview.html', {width: 600, height: 400},
function(w) {
w.contentWindow.addEventListener("DOMContentLoaded", function() {
var doc=w.contentWindow.document;
- var el=doc.querySelector("browser");
+ var el=doc.querySelector("webview");
el.src=args[0];
});
});
View
2 tcpserver/commands/browsertag.html → tcpserver/commands/webview.html
@@ -5,7 +5,7 @@
<title></title>
</head>
<body>
- <browser width="600" height="400" src="about:blank"></browser>
+ <webview style="width: 100%; height: 100%;" width="600" height="400" src="about:blank"></webview>
</body>
</html>
View
2 tcpserver/manifest.json
@@ -3,7 +3,7 @@
"name": "TCP server and client",
"version": "1",
"minimum_chrome_version": "24",
- "permissions": [ "browserTag", { "socket" : ["tcp-listen"] }, "experimental" ],
+ "permissions": [ "webview", { "socket" : ["tcp-listen"] }, "experimental" ],
"app": {
"background": {
"scripts": ["tcp-server.js", "commands/BrowserCommands.js", "main.js"]

0 comments on commit 1dbf84f

Please sign in to comment.