Search Unity

Unable to download Unity Personal in IE11

Discussion in 'Meta-forum Discussion' started by JustCarty, Jul 28, 2017.

  1. JustCarty

    JustCarty

    Joined:
    Dec 13, 2012
    Posts:
    1
    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.

    Code (JavaScript):
    1.     Element.prototype.hasClass = function(classname)
    2.     {
    3.         return (this.className && new RegExp("(^|\\s)" + classname + "(\\s|$)").test(this.className)) || false;
    4.     };
    5.     Element.prototype.removeClass = function(classname) {
    6.         var re = new RegExp("\\b" + classname + " \\b|\\b " + classname + "\\b|\\b" + classname + "\\b");
    7.         if (this.hasClass(classname) || classname == undefined)
    8.         {
    9.             this.className = this.className.replace(re, "");
    10.             return this;
    11.         }
    12.         return this;
    13.     };
    14.     Element.prototype.addClass = function(classname) {
    15.         if (this.hasClass(classname) || classname == undefined)
    16.             return this;
    17.        
    18.         this.className += (this.className.length <= 0 ? "" : " ") + classname;
    19.         return this;
    20.     };
    21.  
    22.     var checkbox = document.querySelector('#personal-checkbox');
    23.     var downloadBtns = document.querySelectorAll('.download-btn');
    24.     if (checkbox.checked)
    25.     {
    26.         checkbox.checked = false;
    27.     }
    28.     if (checkbox)
    29.     {
    30.         checkbox.onclick = function()
    31.         {
    32.             if (!checkbox.checked)
    33.             {
    34.                 for (var i = 0; i < downloadBtns.length; i++)
    35.                 {
    36.                     downloadBtns[i].addClass("download-checkbox-disable");
    37.                 }
    38.             }
    39.             else
    40.             {
    41.                 for (var i = 0; i < downloadBtns.length; i++)
    42.                 {
    43.                     downloadBtns[i].removeClass("download-checkbox-disable");
    44.                 }
    45.             }
    46.         };
    47.     }
     
  2. and-poulsen

    and-poulsen

    Unity Technologies

    Joined:
    Sep 30, 2016
    Posts:
    66
    It should be corrected now, thanks for reporting it!
     
    JustCarty likes this.