if (!Object.create) {
    Object.create = (function(){
        function F(){}

        return function(o){
            if (arguments.length != 1) {
                throw new Error('Object.create implementation only accepts one parameter.');
            }
            F.prototype = o;
            return new F()
        }
    })()
}

 

相关文章:

  • 2022-12-23
  • 2021-08-01
  • 2022-03-06
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2022-02-15
  • 2021-06-24
猜你喜欢
  • 2022-12-23
  • 2021-11-10
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-24
相关资源
相似解决方案