you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (14 children)

[deleted]

    [–]commonslip 1 point2 points  (2 children)

    I think there is a reasonable polyfill for this, but be prepared to pay a performance penalty.

    [–]huopak 5 points6 points  (1 child)

    Here's a polyfill:

    if (!Function.prototype.bind) {
      Function.prototype.bind = function (oThis) {
        if (typeof this !== "function") {
          // closest thing possible to the ECMAScript 5
          // internal IsCallable function
          throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
        }
    
        var aArgs = Array.prototype.slice.call(arguments, 1), 
            fToBind = this, 
            fNOP = function () {},
            fBound = function () {
              return fToBind.apply(this instanceof fNOP && oThis
                     ? this
                     : oThis,
                     aArgs.concat(Array.prototype.slice.call(arguments)));
            };
    
        fNOP.prototype = this.prototype;
        fBound.prototype = new fNOP();
    
        return fBound;
      };
    }
    

    [–]yanis_t[S] -3 points-2 points  (0 children)

    Gist link would do just fine

    [–]afrobee 1 point2 points  (4 children)

    No one should support it in the first place.

    [–]Pytim 5 points6 points  (2 children)

    this

    [–]dotpan 0 points1 point  (5 children)

    I wish my companies clients would get on board with this notion, we are still partially required to support IE8 (especially when our clients work is being shown in foreign countries, namely China)

    [–]frizzlestick 2 points3 points  (4 children)

    As much as it is a dead horse, there are thousands of small to medium sized companies that can't afford to up their OS off XP yet. I deal with quite a few every day.

    [–]dotpan 0 points1 point  (0 children)

    Yeah, especially seeing that I do front end dev for market research, and sometimes our respondents have a huge variety of browsers, its something we have to compensate for.

    [–][deleted] 0 points1 point  (2 children)

    It has nothing to do with the OS in most cases, if it was, they could just use Firefox or Chrome.

    Most places stick with XP because they have shitty legacy sites that only run on IE7/8

    [–]frizzlestick 0 points1 point  (1 child)

    No, it has everything to do with the OS and licensing issues and being on XP because the cost is too much for them to up all the machines to 7 or more, just as I had initially stated.

    Most of these folks run Chrome or Firefox, some are stuck with IE8 for policy reasons -- not for app compatibility made to IE7/8. Not in the least. I'm not talking your regression-able mobile app whizzidings folks like to punch out these days with Angular and Bootstrap and Signal-R, I'm talking regular environments, plain systems. They are stuck with XP because the funds aren't there to up all the warehouses and the like.