⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 15.01 - sellsian approach.js

📁 JS设计模式源代码
💻 JS
字号:
/* From http://pluralsight.com/blogs/dbox/archive/2007/01/24/45864.aspx *//*  * Publishers are in charge of "publishing" i.e. creating the event.  * They're also in charge of "notifying" (firing the event).*/var Publisher = new Observable;/*  * Subscribers basically... "subscribe" (or listen).  * Once they've been "notified" their callback functions are invoked.*/var Subscriber = function(news) {  // news delivered directly to my front porch};Publisher.subscribeCustomer(Subscriber);/*  * Deliver a paper:  * sends out the news to all subscribers.*/Publisher.deliver('extre, extre, read all about it');/*  * That customer forgot to pay his bill.*/Publisher.unSubscribeCustomer(Subscriber);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -