I'm developing a Chrome App and incorporating the web view tag, which functions similarly to an iframe.
Is there a way to load a webpage inside the web view halfway down the page?
I have attempted the following:
application.js:
$(document).ready(function () {
// Assuming <webview id="wv"></webview>
var webview = document.getElementsById("wv");
webview.addContentScripts([{
name: "ExampleRule",
matches: ["http://sentifeed.marstons.co.uk/Index.aspx"], // can be as specific as needed
js: ["content.js"]
}]);
webview.src = "http://sentifeed.marstons.co.uk/Index.aspx";
var webview = document.getElementsById("wv");
webview.executeScript({
file: "content.js"
});
$(".box1").click(function () {
// code for handling click event on box1
});
$(".box5").click(function () {
// code for handling click event on box5
});
$(".box3").click(function () {
// code for handling click event on box3
});
$(".back").click(function () {
// code for handling click event on back button
});
$(".login").click(function () {
// code for handling login click event
});
window.onload = function () {
// code executed when window loads
};
}
My content.js:
window.scroll(0, 150);
html:
<webview id="wv" class="sentifeed"></webview>