I am new to chrome app programming and stackoverflow.
I have a simple chrome app in which I want to embed multiple websites into separate webviews that auto scales depending on how big the user makes the app window but also keeps the ratio per web view. This is so that no matter what size screen the app is displayed on all content shows.
I can get it working for one webview with the code below, however I cannot figure out how to embed more than 1 site.
The image shows my ideal scenario. Ideal:

manifest.json { "name": "Hello World!", "description": "My first Chrome App.", "version": "0.1", "manifest_version": 2, "permissions": [ "webview" ], "icons": { "128": "logo.png" }, "app": { "background": { "scripts": ["background.js"] } } }
background.js
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('index.html', {
bounds: {
'width': 1380,
'height': 1700
}
});
})
index.html
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
margin: 0px;
}
</style>
</head>
<body>
<webview id="wv1" src="http://www.google.com"></webview>
<script src="main.js"></script>
</body>
</html>
main.js
function updateWebviews() {
var webview = document.querySelector("webview");
webview.style.width = document.documentElement.clientWidth + "px";
};
onload = updateWebviews;
window.onresize = updateWebviews;