摘要:
// --file.js--function getJSON(url, callback) { let xhr = new XMLHttpRequest(); xhr.onload = function () { callback(this.responseText) }; xhr.open("GE 阅读全文
posted @ 2016-04-27 15:16
shidengyun
阅读(229)
评论(0)
推荐(0)
摘要:
/* * object.watch polyfill * * 2012-04-03 * * By Eli Grey, http://eligrey.com * Public Domain. * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RIS 阅读全文
posted @ 2016-04-27 09:46
shidengyun
阅读(356)
评论(0)
推荐(0)
摘要:
obj1 = { internal: {}};Object.freeze(obj1);obj1.internal.a = 'aValue';obj1.internal.a // 'aValue'// To make obj fully immutable, freeze each object in 阅读全文
posted @ 2016-04-27 09:21
shidengyun
阅读(219)
评论(0)
推荐(0)
摘要:
const reduce = Function.bind.call(Function.call, Array.prototype.reduce);const isEnumerable = Function.bind.call(Function.call, Object.prototype.prope 阅读全文
posted @ 2016-04-27 09:14
shidengyun
阅读(549)
评论(0)
推荐(0)
摘要:
function defineProperties(obj, properties){ function convertToDescriptor(desc) { function hasProperty(obj, prop) { return Object.prototype.hasOwnPrope 阅读全文
posted @ 2016-04-27 08:55
shidengyun
阅读(655)
评论(0)
推荐(0)

浙公网安备 33010602011771号