forked from lazyboy/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Istiaque Ahmed
committed
Jun 12, 2013
1 parent
16c5611
commit 5575b27
Showing
6 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
New style simple (chromium) platform app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!-- | ||
* Copyright 2013 The Chromium Authors. All rights reserved. Use of this | ||
* source code is governed by a BSD-style license that can be found in the | ||
* LICENSE file. | ||
--> | ||
<html> | ||
<head> | ||
<script type="text/javascript" src="pre.js"></script> | ||
<!-- | ||
<script type="text/javascript" src="jquery-2.0.2.min.js"></script> | ||
--> | ||
<script type="text/javascript" src="main.js"></script> | ||
</head> | ||
<body> | ||
<div>Embedder</div> | ||
<webview style="height: 200px;" src="data:text/html,<body>Guest 0</body>"></webview> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var testD = function() { | ||
/* | ||
console.log('start testD'); | ||
var webview = document.createElement('webview'); | ||
webview.setAttribute('id', 'webview'); | ||
webview.setAttribute('src', 'data:text/html,<body>Guest 1</body>'); | ||
var firstLoad = function() { | ||
window.console.log('first load'); | ||
webview.removeEventListener('loadstop', firstLoad); | ||
window.console.log('first load done'); | ||
}; | ||
webview.addEventListener('loadstop', firstLoad); | ||
document.body.appendChild(webview); | ||
*/ | ||
}; | ||
|
||
window.onload = function() { | ||
testD(); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"manifest_version": 2, | ||
"name": "<webview>.JQuery", | ||
"version": "1", | ||
"minimum_chrome_version": "23", | ||
"permissions": [ | ||
"webview" | ||
], | ||
"app": { | ||
"background": { | ||
"scripts": ["test.js"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
window.console.log('app: add listener for doc.load'); | ||
window.addEventListener('DOMContentLoaded', function(e) { | ||
window.console.log('document.DOMContentLoaded'); | ||
window.console.log('window.FOO = ' + window.FOO); | ||
var w = document.querySelector('webview'); | ||
window.console.log('webview: ' + w); | ||
window.console.log('try to Object.defineProperty'); | ||
Object.defineProperty(w, 'name', { | ||
get: function() { return 'foo-name'; }, | ||
set: function(value) { window.console.log('ignore setting name: ' + name); }, | ||
enumerable: true | ||
}); | ||
//document.body.appendChild(w); | ||
window.console.log('done try to Object.defineProperty'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Listens for the app launching then creates the window | ||
* | ||
* @see http://developer.chrome.com/trunk/apps/app.runtime.html | ||
* @see http://developer.chrome.com/trunk/apps/app.window.html | ||
*/ | ||
chrome.app.runtime.onLaunched.addListener(function() { | ||
chrome.app.window.create('main.html', {width: 500, height: 300}); | ||
}); | ||
|
||
window.console.log('*** test.js: ' + window.FOO); |