How to handle lack of JavaScript Object.bind() method in IE 8

前端 未结 4 2196
长情又很酷
长情又很酷 2020-11-27 07:13

I am writing a bit of JavaScript that uses the Object.bind method.

funcabc = function(x, y, z){ 
    this.myx = x;
    this.playUB = function(w)         


        
4条回答
  •  天命终不由人
    2020-11-27 07:23

    The best solution could be to install Modernizr.

    Modernizr tells you whether the current browser has this feature natively implemented or not and it provides a script loader so you can pull in polyfills to backfill functionality in old browsers.

    Here is the link to generate your modernizr custom version:
    http://modernizr.com/download/#-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes

提交回复
热议问题