Support IE11

Previously `let of` loop was used, which isn't supported in IE11.

It seems it just fails when there is some JS syntax error
(doesn't matter where exactly) and dataType: 'json' has no effect.

Closes #982
This commit is contained in:
Artur Beljajev 2018-10-27 16:18:29 +03:00
parent 8666f4f714
commit 02f9e99428
6 changed files with 35 additions and 8 deletions

View file

@ -1,11 +1,13 @@
(function() {
(function () {
function disableSpellCheck() {
let selector = 'input[type=text], textarea';
let textFields = document.querySelectorAll(selector);
for (let field of textFields) {
field.spellcheck = false;
}
textFields.forEach(
function (field, _currentIndex, _listObj) {
field.spellcheck = false;
}
);
}
disableSpellCheck();