** Summary ** '''ECMAScript''', is a scripting language whose best-known implementation is [javascript%|%JavaScript] ** See Also ** [javascript]: an implementation of ECMAScript [Ajax]: Javascript code that relies heavily on XMLPostRequest component and its callbacks. [emscripten]: a compiler that targets ECMAScript. It has been used to succesfully compile both [Tcl], [Jim], and [Picol]. [Lua]: a scripting language that shares some traits of ECMAScript, including objects that can obtain new methods and member variables [Tcl in Javascript]: [ncgi] and [html]: [tcllib] modules for generating [HTML] and ECMAScript code. [tcljs]: Tcl wrapper for the NJS JavaScript interpreter library ** Documentation ** [http://www.windley.com/archives/2006/03/introduction_to.shtml%|%Introduction to JavaScript] ,ETech ,2006: [http://www.linux.com/news/software/developer/26225-the-latest-javascript%|%The Latest JavaScript] ([http://web.archive.org/web/20100731082624/http://ldn.linuxfoundation.org/column/the-latest-javascript%|%alternate]) ,[Cameron Laird] ,2009: [http://www.w3.org/wiki/JavaScript_best_practices%|%Javascript best practices] ,W3C: [http://javascript.crockford.com/style1.html%|%The Elements of Javascript Style] ,Douglas Crockford ,2005: [http://shop.oreilly.com/product/9780596517748.do%|%JavaScript: The Good Parts] ,Douglas Crockford: ** Resources ** [http://zeptojs.com%|%zepto.js]: a lightweight JavaScript library that is mostly API-compatible with [http://jquery.com%|%jqeury] ** Description ** ECMAScript is a scripting language with a built-in prototype-based object system. JavaScript and Tcl have a special relation: both at Sun and Netscape (Mosaic, originally), the two were in strategic competition. Roger Binns [[rogerb@rogerbinns.com]] originally embedded a Tcl interpreter in the Mosaic browser; "[[d]]etails are in the proceedings of the 2nd WWW [[C]]onference". He writes about this that, "The audience were in awe of a demo that printed an entire book based on following the rel links in web page headers, got everything in the right order, loaded the pages and printed". : [http://mail.python.org/pipermail/python-list/2004-April/273703.html%|%Is Perl *that* good? (was: How's ruby compare to it older bro] ,python mailing list 2004-04. Netscape chose JavaScript, though. ** Learning ECMAScript ** [Jenglish], [Tcl Chatroom] ,2013-10-15, recommends reading through the [http://underscorejs.org/docs/underscore.html%|%annotated source code of UNDERSCORE.JS] to see how they do things ** Evaluating ECMAScript from Tcl ** [NEM]: If you want to evaluate JavaScript code from Tcl, then there are a couple of options. Firstly, [hv3], the web-browser built on top of [TkHTML] comes with a binding to the SEE ECMAScript Interpreter library. Secondly, I also have a very quick/simple binding to the NJS interpreter library available from [http://www.cs.nott.ac.uk/~nem/tcl/]. [jdc]: Another option is http://code.google.com/p/tcljs/%|%tcljs%|%. It can be used to embed spidermonkey in a Tcl application. It can be used in combination with [http://code.google.com/p/tcljspac/%|%tcljspac%|%] to process `proxy.pac` files. Yet another option for bindings to [http://aolserver.cvs.sourceforge.net/viewvc/aolserver/nsjsapi/%|%SpiderMonkey] ** Testing ECMAScript ** 630-487-6272 Anyone who has read this far will probably want to know about [http://zombie.labnotes.org/%|%Zombie], created for automatic testing of ECMAScript-coded applications (more than that, really; it also knows about [CSS], ...). It's of broader interest, though, mostly in directions where Tclers swarm: automation, [Web scraping], [DOM] analysis, ... Zombie is [open source], of course, and a nice model for at least a few techniques that are useful in Tcl-oriented [testing] code. <> Language