Commit 6f5a66ad authored by Laurent Sittler's avatar Laurent Sittler ©
Browse files

fix: internet explorer compatibility

- Change foreach operator by a for
parent c5adf8f0
......@@ -11,13 +11,15 @@ fluentui.content = (function () {
*/
function imgGallery() {
var images = document.querySelectorAll('.kg-gallery-image img');
images.forEach(function (image) {
var container = image.closest('.kg-gallery-image');
var width = image.attributes.width.value;
var height = image.attributes.height.value;
var ratio = width / height;
container.style.flex = ratio + ' 1 0%';
});
if (images) {
for (var i = 0; i < images.length; i++) {
var container = images[i].closest('.kg-gallery-image');
var width = images[i].attributes.width.value;
var height = images[i].attributes.height.value;
var ratio = width / height;
container.style.flex = ratio + ' 1 0%';
}
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment