The Bungee Blog

News, updates and rants around The Bungee Book (the landmark book on Prototype and script.aculo.us)

The Ghosts of Absolute Uncertainty

Right.

So I get my first review on Amazon.com, and what do I learn in there? That my ghosting example b0rks. Dang! The code is simple, so what gives?

Well, it so happens that my own code in Scripty’s ghosting support for non-absolutely-positioned elements is flawed: it relies (for a reason I can’t fathom in retrospect) on expandoes, and attempts to remove them when it’s done, which IE (both 6 and 7) does not support (it lets us removeAttribute it though).

As a reminder, an expando property is a custom property you slap onto an unsuspecting DOM element. You can think of it like a custom attribute on an HTML tag, but at the DOM level.

This issue was noticed before, too, and a ticket was opened in Trac a month ago, but I sadly confess I have no time these days to monitor anything in the Trac but the changesets.

Since expandoes are unnecessary in this very context, I stripped the superfluous indirection in the source code, created a patch, updated the ticket and my book’s online codebase (both the expanded file and the archive files).

So feel free to grab the new files and go along! I can only hope Thomas will apply the fix soon, so the official release is in sync.

Update Jan 21: Thomas applied the patch. You can grab the edge version from Subversion trunk.

No comments yet. Be the first.

Leave a reply