689 items tagged “javascript”
2007
Ten New Things in WebKit 3. Does “incremental updates for persistent server connections” for XMLHttpRequest mean Safari now has native support for Comet?
google-axsjax (via) “The AxsJAX framework can inject accessibility enhancements into existing Web 2.0 applications using any of several standard Web techniques”—including bookmarklets and Greasemonkey. The enhancements conform to W3C ARIA, supported by Firefox 2.0 and later.
JavaScript Method Overloading. John Resig shows a clever trick for overloading JavaScript methods based on the number of arguments, using the little-known .length property of a JavaScript function object.
HTML5 Media Support in WebKit. WebKit continues to lead the pack when it comes to trying out new HTML5 proposals. The new audio and video elements make embedding media easy, and provide a neat listener API for hooking in to “playback ended” events.
Eye-Fi launches. Really neat idea: a digital camera SD card with built-in WiFi to beam your photos straight to your laptop. SitePen built the UI, which runs in your browser on top of Dojo and talks to a small web server running locally.
JavaScript Madness: Keyboard Events. Keyboard events in JavaScript are a total pain. This looks like a pretty comprehensive reference to getting them to work cross-browser.
Pseudo-custom events in Prototype 1.6. Useful tutorial showing how to use Prototype 1.6’s custom events to implement a cross-browser mouse wheel event.
dojo.NodeList API docs. Support in Dojo for jQuery-style chaining operations.
In the long term, I want to replace JavaScript and the DOM with a smarter, safer design. In the medium term, I want to use something like Google Gears to give us vats with which we can have safe mashups. But in the short term, I recommend that you be using Firefox with No Script. Until we get things right, it seems to be the best we can do.
Announcing Dojo 1.0. The tough learning curve that accompanied 0.4 and earlier has been replaced with an elegant core module (dojo) and two exciting subprojects (dojox and dijit). Well worth a look.
Comet Daily. New regularly updated site covering Comet, the Ajax-like umbrella term for JavaScript server-push techniques. Already a bunch of great stuff on there.
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.
How to make Ajax work for you. Slides from my three hour Ajax tutorial, presented at Web 2.0 Expo Berlin on Monday.
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.
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.
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.
jQuery Logging (via) Brilliant four line jQuery plugin that lets you insert Firebug console.log() calls directly in to chains.
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.
Dealing with the Flexibility of JavaScript. Some thoughts on function signature overloading in JavaScript.
The Art & Science of JavaScript. My first author credit: I’m contributing a chapter to SitePoint’s next JavaScript tome.
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.
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.
Native DOMContentLoaded is coming to Safari. I filed this bug over two years ago. They’ve just committed the resulting patch to trunk.
Roll out your own JavaScript Interfaces. Dustin shows how to build a tiny jQuery-style (chainable) library that contains your own JavaScript convenience functions.
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.
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.
IEContentLoaded. An alternative method of detecting DOMContentLoaded on IE; works by polling until the doScroll() method on an unattached element stops throwing errors.
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.
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.
ActsAsUndoable. Lawrence Carvalho shows how robust undo functionality can be added to a JavaScript application through careful application of the Memento design pattern.