javascript document.querySelectorAll() seems to fail
Opened this issue · 0 comments
juiceme commented
I have an application that enumerates list of elements in a page in a function invoked by button click.
On Sailfish browser the button click does not do anything, and when starting the browser from console I get the following error on button press;
JavaScript error: http://localhost:8080/ line 269 > Function, line 1: TypeError: document.querySelectorAll(...).forEach is not a function
This is the function tied to the button;
var username='';
var password='';
document.querySelectorAll('input').forEach(function(i) {
if(i.key === 'userNameInput') { username = i.value; };
if(i.key === 'passwordInput') { password = i.value; };
});
sessionPassword=Sha1.hash(password + Sha1.hash(username).slice(0,4));
sendToServer('userLogin', { username: Sha1.hash(username) } );
return false;