Vacaciones de Navidad de la empresa
Desde el 21 de Diciembre 2015 hasta el 3 de enero 2016, nuestra oficina en Münster trabaja con un equipo mínimo. Soporte limitado está disponible durante este período.
Deseamos a ustedes y sus familas Feliz Navidad y un próspero año nuevo.

 

Informe Bug: javascript in chromium browser

Reproducción

Javascript not working in Chromium engine

Descripción

I have some very simple code in my T&Cs pages that sets a localStorage flag to avoid the customer having to go through the acceptance process every time they hit the home button.

The two functions look like:
function checkConfirm() {
if(typeof(Storage) !== "undefined") {
if (localStorage.confirmed) {
return localStorage.getItem("confirmed");
}
else return "";
}
else return "";

}
function atamoSetConfirmed() {
localStorage.setItem("confirmed", "yes");
}

I have tested this code using Chrome, IE, Edge and Safari and it works in all of these environments. It also works with the IE engine in SiteKiosk. It doesn't work with Chromium though.

I need to be able to use the Chromium browser as the customer prefers this presentation. There are also a number of issues with the IE presentation that are forcing me away from using it.

Why would this code work everywhere other than Chromium? There are no errors logged to the logger when this code is called - it is silent.

Respuesta: (2)

Re: javascript in chromium browser 04/08/2017 11:41
Hello,

There is no issue with using JavaScript and/or localStorage in Chrome Browser skin.
These W3Schools examples work without any issue:
https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_webstorage_local_clickcount
https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_webstorage_local

This code e.g. also works in the browser:

<!DOCTYPE html>
<html>
<body>
<script>
function checkConfirm() {
if(typeof(Storage) !== "undefined") {
if (localStorage.confirmed) { 
 document.getElementById("result").innerHTML = localStorage.getItem("confirmed");
}}}
function atamoSetConfirmed() {
localStorage.setItem("confirmed", "yes");
} 
</script>
<p><button onclick="atamoSetConfirmed()" type="button">atamoSetConfirmed</button></p>
<p><button onclick="checkConfirm()" type="button">checkConfirm</button></p>
<div id="result"></div>
</body>
</html>



If you want to debug your code in Chrome Browser skin you may enable the developer console.
Put an empty text file with the name “debug.txt” into the folder “…\SiteKiosk\Chromium”.
Then press F11 after you have started SiteKiosk with Chrome Browser Skin.

The Chrome Browser Skin uses a Chromium CEF browser engine installed with SiteKiosk.
If you want to check it outside of SiteKiosk you can use the Chromium CEF Browser test application (you need to extract the download twice with using 7ZIP)::
http://opensource.spotify.com/cefbuilds/cef_binary_3.2883.1553.g80bd606_windows32_client.tar.bz2

The Link above downloads Chromium 55.0.2883.87 Windows 32 Bit that is used in SiteKiosk 9.4 and 9.5. Here the main pages of the Chromium CEF project:
http://opensource.spotify.com/cefbuilds/index.html
https://bitbucket.org/chromiumembedded/cef


Regards,
Michael Olbrich
Re: javascript in chromium browser 04/08/2017 15:49
Thanks for testing it. I will enable the debugger on Monday and test my code.