javascript

TwitterFacebook
Get flash to fully experience Pearltrees
http://lea.verou.me/chainvas/ chain•vas |chānvəs| n. A tiny, modular library that can add chaining to any API that isn’t naturally chainable, like the Canvas API, the DOM and more. Only 1-2KB minified How does it work? chainvas goes through all the methods in a prototype and wraps a function around them that returns the returned value or, if that is undefined , the function’s context ( this ). Since the function context is our original object, we can keep calling methods without having to write the variable name over and over again, like this:

chainvas: Chaining for everyone

JavascriptTips - jslibs - JavaScript language advanced tips and tricks - standalone JavaScript development runtime environment with general purpose native libraries

http://code.google.com/p/jslibs/wiki/JavascriptTips#language_advanced_Tips_&_Tricks These tips and tricks are not related to any web browser or any Document Object Model (DOM), they are only general purpose tips and tricks for the JavaScript language. Some of these tricks are using a latest version of JavaScript language (v1.8) and cannot run with the Microsoft Implementation of JavaScript (v1.5). All these tricks has been tested with the Mozilla SpiderMonkey/TraceMonkey JavaScript engine (v1.8). You can try these examples using jshost , a command-line JavaScript interpreter. ( download it ). If you need more explanation about one of the following tips, don't hesitate to ask me or use the comment section at the end of this page.