Stack Overflow на русском Asked by Frontender on November 22, 2021
Есть js-код, который всем iframe задает атрибут src. Но в IE11 он не срабатывает.
В чем может быть проблема?
document.querySelectorAll("iframe[name=form_reg]").forEach(function callback(frame, index, array) {
frame.setAttribute("src", "https://domain.link/form/i/?type=landing&prelanding=" + encodeURIComponent(window.location.hostname) + "&" + location.search.substring(1));
});
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);
}
};
}
Answered by Qwertiy on November 22, 2021
Думаю проблема тут
iframe[name='form_reg']
Answered by Aziz Umarov on November 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP