Posts from: June, 2007

27 Jun 2007

Hacking a 3rd party script for bookmarklet fun

A few weeks ago I created a simple bookmarklet that loads del.icio.us’s PlayTagger script into the current page. This post covers how some problems with this script were worked through. Too late The first challenge was that PlayTagger was designed to initialize itself (let’s call this method “init“) on window.onload: If a user fired the [...]

25 Jun 2007

Kill these DOM0 shortcuts

A problem a decade in the making You can refer to a form’s elements in your code by using the element’s name (from the NAME attribute) – an ancient Javascript spec. This means myForm.myElement is a shortcut for myForm.elements['myElement']. I’m sure this was seen as handy and harmless at the time, but the problem is [...]