Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- "use strict";
- var webView;
- WinJS.UI.Pages.define("/pages/home/home.html", {
- // This function is called whenever a user navigates to this page. It
- // populates the page elements with the app's data.
- ready: function (element, options) {
- // TODO: Initialize the page here.
- webView = document.getElementById("webview");
- webView.navigate("http://www.google.com");
- webView.addEventListener("mswebviewdomcontentloaded", function () {
- var invScr = webView.invokeScriptAsync("eval", "document.getElementById('hplogo').style.backgroundColor = 'black';");
- Debug.write("Debug write");
- invScr.onerror = function () {
- Debug.write("Doesn't work");
- };
- invScr.oncomplete = function () {
- Debug.write("Works");
- };
- invScr.start();
- });
- }
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement