Polyfill

Ployfill

  • 自動補完函式庫
  • 將缺少的新功能增加到程式中
//  polyfill    
if (!Object.create) {
    Object.create = function (o) {
        if (arguments.length > 1) {
            throw new Error('Object.create implementation only accepts the first parameter');
        }
        function F () {};
        F.prototype = o;
        return new F();
    };
}

延伸閱讀

results for ""

    No results matching ""