摘要:
一、单例模式 不透明单例 or 透明单例 用代理实现单例模式 惰性单例 通用的惰性单例 二、发布订阅模式 全局的发布订阅对象 全局事件的命名冲突处理 Event.listen('click', function(a){ console.log(a);//1 }); /*************使用命 阅读全文
摘要:
//Promise版本的Ajaxconst getJSON = function(url) { const promise =new Promise(function(resolve, reject) { const handler = function() { if(this.readyState!==4) { ... 阅读全文