Simon Willison’s Weblog

Subscribe

642 items tagged “javascript”

2007

Gmail Greasemonkey API (via) The new version of Gmail includes API hooks for Greasemonkey script authors. The documentation is by Mark Pilgrim, author of Greasemonkey Hacks. # 7th November 2007, 10:38 am

How to make Ajax work for you. Slides from my three hour Ajax tutorial, presented at Web 2.0 Expo Berlin on Monday. # 7th November 2007, 10:35 am

The Story Behind ES4. If you’re scratching your head at the recent eruption of acrimony surrounding ECMAScript 4 (the next standardised version of JavaScript) Neil Mix has a relatively easy to follow catch-up post. # 2nd November 2007, 6:15 am

Site-specific browsers and GreaseKit. New site-specific browser tool which lets you include a bunch of Greasemonkey scripts. For me, the killer feature of site-specific browsers is still cookie isolation (to minimise the impact of XSS and CSRF holes) but none of the current batch of tools advertise this as a feature, and most seem to want to share the system-wide cookie jar. # 25th October 2007, 7:56 am

Upgrading to Prototype 1.6: real world examples. I still don’t find Prototype as intuitive as jQuery, but the API improvements between 1.5 and 1.6 are very impressive. # 24th October 2007, 7:19 pm

jQuery Logging (via) Brilliant four line jQuery plugin that lets you insert Firebug console.log() calls directly in to chains. # 19th October 2007, 12:52 pm

CouchDB first impressions. Jacob’s been poking at CouchDB. Inserting data is slow, but everything else looks pretty slick considering how recently the JSON / JavaScript views functionality was added. # 19th October 2007, 11:43 am

Dealing with the Flexibility of JavaScript. Some thoughts on function signature overloading in JavaScript. # 16th October 2007, 11:24 am

The Art & Science of JavaScript. My first author credit: I’m contributing a chapter to SitePoint’s next JavaScript tome. # 15th October 2007, 10:35 pm

Using the jQuery test suite for your own projects. jQuery’s test suite has clever start(), stop() and expect() methods for running assertions within asynchronous code. # 12th October 2007, 12:56 pm

Global namespace pollution in IE. Another reason to avoid JavaScript global variables like the plague: IE creates a bunch of them for you which may well intefere with your own code. # 10th October 2007, 10:10 am

Native DOMContentLoaded is coming to Safari. I filed this bug over two years ago. They’ve just committed the resulting patch to trunk. # 8th October 2007, 1:07 am

Roll out your own JavaScript Interfaces. Dustin shows how to build a tiny jQuery-style (chainable) library that contains your own JavaScript convenience functions. # 6th October 2007, 12:20 am

I have another technique [...] that I’ll be switching jQuery to. If you attempt to insert into the document.body before the document is fully loaded, an exception is thrown. I take advantage of that to determine when the document is fully loaded.

John Resig # 26th September 2007, 12:21 pm

DOMContentLoaded for IE, Safari, everything, without document.write. Stuart has taken Hedger’s recent IE technique, combined it with the others and compressed it in to a short-as-possible code snippet that you can paste in to your scripts without having to include the whole of jQuery/YUI/Dojo/Prototype. # 26th September 2007, 12:19 pm

IEContentLoaded. An alternative method of detecting DOMContentLoaded on IE; works by polling until the doScroll() method on an unattached element stops throwing errors. # 24th September 2007, 12:10 pm

Hello JS-CTYPES, Goodbye Binary Components. Mark Finkle is porting Python’s ctypes functionality to the Mozilla platform, to allow binary XPCOM components to be defined in pure JavaScript. # 22nd September 2007, 11:57 pm

Apparently if you try to remove/destroy/trash a FORM dom node in IE6, it won’t delete it, instead creating a bizarre orphaned node stuck sucking up memory until the browser window is refreshed.

Jon Sykes # 20th September 2007, 1:04 pm

ActsAsUndoable. Lawrence Carvalho shows how robust undo functionality can be added to a JavaScript application through careful application of the Memento design pattern. # 18th September 2007, 3:51 pm

The Elements of JavaScript Style. Douglas Crockford illustrates better coding practises through refactoring of old code. # 13th September 2007, 8:22 am

jQuery 1.2. Lots of neat new stuff; my favourite new feature is “Partial .load()” which lets you pull in HTML with Ajax and then use a CSS selector to grab a subset of that page and inject it in to the DOM. # 11th September 2007, 8:44 am

Google Maps API gets clickable polylines and polygons. Interesting explanation of how they optimised calculating the distance to the nearest point on a polyline. # 8th September 2007, 12:58 pm

Protoscript (via) JavaScript tool designed for easy prototyping of JS interactions; powered by YUI and jQuery. # 7th September 2007, 10:55 pm

HTTPOnly cookie support in Firefox. Five years after the bug was filed, HTTPOnly cookie support has gone in to the Mozilla 1.8 branch. This is a defence in depth feature that has been in IE for years—it lets you set cookies that aren’t available to JavaScript, and hence can’t be hijacked in the event of an XSS flaw. # 6th September 2007, 6:27 am

CouchDb: Some Context. CouchDb developer Jan Lehnardt wrote up detailed notes on slides from a presentation he gave back in June, explaining most of what’s interesting about CouchDb (although without the new JavaScript function query language). # 4th September 2007, 2:31 am

CouchDB: Thinking beyond the RDBMS. CouchDB is a fascinating project—an Erlang powered non-relational database with a JSON API that lets you define “views” (really computed tables) based on JavaScript functions that execute using map/reduce. Damien Katz, the main developer currently works for MySQL and used to work on Lotus Notes. # 3rd September 2007, 9:48 am

Freebase. Out of closed beta, although you still need an invite code to contribute. I hope they drop the JavaScript requirement for viewing content on the site. # 3rd September 2007, 2:35 am

Google Web Toolkit: Towards a better web. Good overview of why GWT exists, but I take exception to the title: requiring JavaScript to even display something does not make the web “better”. # 29th August 2007, 8:21 pm

jQuery 1.1.4: Faster, More Tests, Ready for 1.2. The backwards compatibility policy for 1.2 is pretty clever: provide a plugin that restores removed functionality (such as XPath selectors). # 24th August 2007, 4:22 pm

Building a JavaScript Library. Slides from John Resig’s Google Tech Talk. Some great tips in here, including: make your APIs orthogonal, look for common patterns, keep things extensible and write the documentation yourself. # 24th August 2007, 4:02 pm