【发布时间】:2017-12-06 12:07:37
【问题描述】:
我正在尝试向format function 添加功能,但我的代码有问题:
Object.defineProperty(Intl.NumberFormat.prototype, "format", { value: function(){
//your logic here
let orig = Intl.NumberFormat.prototype
console.log(orig);// does not remember the original proto
}, configurable: true } );
我错过了什么?
【问题讨论】:
-
“原始原型”是什么意思?你在期待什么?
标签: javascript prototype ecmascript-intl