I’m studying webview in packaged apps of chrome and I’m studying browser sample from chrome.
in browser.js file in onload function, I added alert(“webview apps”); at the first row and the code didn’t work anymore, when I deleted this row, it worked again.
onload = function() {
alert("webview app");
var webview = document.querySelector('webview');
doLayout();
...
}
so does alert work on packaged apps?
P/s: console.log also doesn’t work, I saw the source code use it, but nothing is displayed on inspect element window
Console.log should work, it all depends on what view you are looking at. For example to get to the logs when in a window, you have to “Inspect Element” on the page to get to it.
Alert has been disabled along with confirm and a number of other legacy web features.