随笔分类 - Pro JavaScript Development
Pro JavaScript Development工作摘记
摘要:
阅读全文
摘要:It’s worth noting that in JavaScript applications the Model is often connected via Ajax to a back-end service acting as a database for stored data rep...
阅读全文
摘要:// Store all parameters but the first passed to this function as an array //除了第一个参数,把调用publish函数时的所有传入参数保存为一个数组。 var data = Arr...
阅读全文
摘要:P173Listing 7-6. The observer pattern // If an event by the supplied name has not already been subscribed to, create an // array...
阅读全文
摘要:Aselfobject, which is the global object representing the worker in this scope.对self对象的译法,未知妥否。 1 // Call the invertImage method when this worker recei...
阅读全文
摘要:If you need to observe the exact memory usage of your application at any point, you can use the Heap Snapshotfeature within the Profilestab of the Chr...
阅读全文
摘要:You can denote particular console messages and variable values as having different types using four variant methods of the console.log() method:
阅读全文
摘要:For JavaScript-based projects, it makes sense to have a command line task runner that executes JavaScript-based tasksnativelyso that developers can e...
阅读全文
摘要:Both Grunt and Gulp.js perform these automation tasks particularly well, although Gulp.js has the edge on speed, whereas Grunt has the best plugin sup...
阅读全文
摘要:Gulp.js features its own built-in watch() method - no external plugin required----However, theArnagewillfeatureitsownuniquepowertrainandwill bestrictl...
阅读全文
摘要:The results are then passed to a reporter function that displays the results of the code analysis in the command window—exactly the kind of division o...
阅读全文
摘要:Grunt supports the ability to split each task configuration into several separate configurations allowing different task options to accommodate differ...
阅读全文
摘要:Because one of the original goals of the Node.js project was to allow developers to easily build applications that support server-push capabilities, a...
阅读全文
摘要:遇到这么一句话。 // Connect the Socket.IO framework up to the web server to piggy back on its connection // 把Socket.IO框架连挂在网页服务器以依附到它的连接上。 io = soc...
阅读全文
摘要:1 //为实现各种现代浏览器的requestAnimationFrame()方法,创建一段简单的跨浏览器保障代码(polyfill),以实现流畅、高效的动画。由保罗•艾里什(Paul Irish)编写,网址为 http://bit.ly/req_anim_frame。 2 window.req...
阅读全文