摘要:
// --file.js--function getJSON(url, callback) { let xhr = new XMLHttpRequest(); xhr.onload = function () { callback(this.responseText) }; xhr.open("GE 阅读全文
摘要:
/* * object.watch polyfill * * 2012-04-03 * * By Eli Grey, http://eligrey.com * Public Domain. * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RIS 阅读全文
摘要:
obj1 = { internal: {}};Object.freeze(obj1);obj1.internal.a = 'aValue';obj1.internal.a // 'aValue'// To make obj fully immutable, freeze each object in 阅读全文
摘要:
const reduce = Function.bind.call(Function.call, Array.prototype.reduce);const isEnumerable = Function.bind.call(Function.call, Object.prototype.prope 阅读全文
摘要:
function defineProperties(obj, properties){ function convertToDescriptor(desc) { function hasProperty(obj, prop) { return Object.prototype.hasOwnPrope 阅读全文