- shim - What is a Polyfill? / Shim vs Polyfill / Extend the Web Forward
- mo - A collection of OzJS core modules
Object.observe- 原生支持: chrome,node-harmony
- shim - What is a Polyfill? / Shim vs Polyfill / Extend the Web Forward
- mo - A collection of OzJS core modules
Object.observe| bind = function(oThis) { | |
| if (typeof this !== "function") { | |
| throw new TypeError("Function.prototype.bind 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 |