Two recent articles argue for an approach to writing JavaScript that relies on the individual capabilities and quirks of a browser, rather than one that relies on sniffing as a first option. This is a noble idea and one we’ve started to integrate into Prototype over the last six months. But, like everything else involving DOM scripting, it’s complicated.
Category: Web
Here’s something I worked on for a few hours just to amuse myself. I’d develop it further, but I can’t see how this has any sort of practical use (also note the caveats at the top of the script). So here it is: a web page desaturator. Takes all colors in linked stylesheets and turns them into grayscale versions. Here’s a demo using a page from the Prototype site. Firefox only.
Prototype 1.5.1, release candidate 1. This one contains my complete $$
overhaul, so if you query by CSS selector at all then you need to download this right now. Once 1.5.1 gets a final release (and when I’m once again sober) I’ll write a lot more about this.
SXSW Interactive starts tomorrow. Truthfully, I have been so busy this last week that I don’t even know which panels I’m going to. But if you’re a fan of JavaScript, you should come see Aaron Gustafson and I talk about block scope, iterator/generators, and other fun stuff that you’ll be able to use someday. (If you’re not a fan of JavaScript, attend something else. You wouldn’t like our panel at all.) And if you see me there, be sure to introduce yourself!
Fortunately, I have a place for my wildly inaccurate and unreasonable screeds. It’s called a “weblog,” or, for short, my “eblo.”
Packing Prototype
Here’s a quick workflow to compress whatever version of Prototype you please.
Attention bloggers high and low: if you allow me to make comments on your posts, you are entitled to mandate that I write them in whatever crazy moon format you choose: I’m comfortable with Markdown, Textile, or even the ordinary HTML that our ancestors used to use. But if you do not give me a preview button — so that I can make sure my comment looks the way I intended it to look; so that I am warned if you’ve arbitrarily decided to blacklist the blockquote
element — I am entitled to reach through the Internet and strangle you.
Allan Odgaard plugs my JavaScript Tools Bundle, which (thanks to Thomas Aylott) is now a part of BundleForge. Pretty cool.
Maciej announces feature freeze for WebKit nightlies. They’re going to focus on stability leading up to the Leopard release. They’ve added a lot of stuff since 2.0, especially on the JavaScript front: mutable DOM prototypes, DOM L3 XPath, getters and setters, and engine performance improvements. If all browsers moved this quickly I’d be a very happy man.
Talking with Microsoft about IE.next. The things he asked for (mostly JS‐related) were determined (by vote) to be the most critical things for IE to catch up on. I’m optimistic.