mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
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:
parent
8666f4f714
commit
02f9e99428
6 changed files with 35 additions and 8 deletions
11
app/assets/javascripts/polyfills/node_list_for_each.js
Normal file
11
app/assets/javascripts/polyfills/node_list_for_each.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
// Needed mainly for IE11
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
|
||||
|
||||
if (window.NodeList && !NodeList.prototype.forEach) {
|
||||
NodeList.prototype.forEach = function (callback, thisArg) {
|
||||
thisArg = thisArg || window;
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
callback.call(thisArg, this[i], i, this);
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue