Unable to download Unity Personal in IE11

Apologies if this is in the wrong place, I couldn’t find a thread for the main website.
What happened when trying to download Unity in Internet Explorer 11 (as well as Edge 14) I got the error “SCRIPT438: Object doesn’t support property or method ‘forEach’ (306,9)”.
Allegedly IE 9 and above should support this method but it does not for some reason. The issue is that when I click the “By clicking, I confirm that I am eligible[…]” the download button remains disabled.
I did manage to produce some code that is supported by all versions of all browsers. The code is on pastebin as well as below.

    Element.prototype.hasClass = function(classname)
    {
        return (this.className && new RegExp("(^|\\s)" + classname + "(\\s|$)").test(this.className)) || false;
    };
    Element.prototype.removeClass = function(classname) {
        var re = new RegExp("\\b" + classname + " \\b|\\b " + classname + "\\b|\\b" + classname + "\\b");
        if (this.hasClass(classname) || classname == undefined)
        {
            this.className = this.className.replace(re, "");
            return this;
        }
        return this;
    };
    Element.prototype.addClass = function(classname) {
        if (this.hasClass(classname) || classname == undefined)
            return this;
       
        this.className += (this.className.length <= 0 ? "" : " ") + classname;
        return this;
    };

    var checkbox = document.querySelector('#personal-checkbox');
    var downloadBtns = document.querySelectorAll('.download-btn');
    if (checkbox.checked)
    {
        checkbox.checked = false;
    }
    if (checkbox)
    {
        checkbox.onclick = function()
        {
            if (!checkbox.checked)
            {
                for (var i = 0; i < downloadBtns.length; i++)
                {
                    downloadBtns[i].addClass("download-checkbox-disable");
                }
            }
            else
            {
                for (var i = 0; i < downloadBtns.length; i++)
                {
                    downloadBtns[i].removeClass("download-checkbox-disable");
                }
            }
        };
    }

It should be corrected now, thanks for reporting it!

1 Like