Add Array.from replacement for IE11 support

issue7559
review47581002
This commit is contained in:
Sergi Almacellas Abellana
2018-08-01 10:33:39 +02:00
parent 3395f90190
commit 1ac95294b1
+12
View File
@@ -56,6 +56,18 @@ var Sao = {};
};
}
if (!Array.from) {
Array.from = function (value) {
// Implementation is not strictly equivalent but works for most
// cases
var result = [];
value.forEach(function(e) {
result.push(e);
});
return result;
};
}
// Ensure RichText doesn't use style with css
try {
document.execCommand('styleWithCSS', false, false);