Simon Willison’s Weblog

Blogmarks tagged selectors, javascript

Filters: Type: blogmark × selectors × javascript ×

Dojo 1.3 now available. Looks like an excellent release. dojo.create is particularly nice—I’d be interested to know why something similar has never shipped with jQuery (presumably there’s a reason) as it feels a lot more elegant than gluing together an HTML-style string. Also interesting: you can swap between Dojo’s Acme selector engine and John Resig’s sizzle. # 1st April 2009, 12:19 am

jeresig’s sizzle. Sizzle is a new selector engine (work in progress, no IE support yet) from John Resig, designed to be small, standalone, library agnostic and ridiculously fast. It should eventually replace jQuery’s current selector engine, but if it stays around 4KB it’s also going to be really useful for projects that don’t need the overhead of a full library. # 24th August 2008, 11:41 pm

querySelectorAll in Firefox 3.1. John Resig benchmarks the various JavaScript libraries’ support for querySelelectorAll, and finds an impressive 2-6x performance improvement over native DOM traversal. It’s worth clicking through to John’s experimental plugin for adding support to jQuery, which does a clever trick using __proto__ to convert the collection returned by querySelectorAll in to a jQuery object in browsers that support it. # 21st August 2008, 9:50 am

Internet Explorer 8 Readiness Toolkit. The new built-in development tools look similar enough to Firebug to make me very happy. Also of interest: Selectors API (for fast getElementsBySelector), CSS 2.1 support, support for XHTML style namespaces in HTML, an interesting Web Slices feature based on the hAtom microformat and 6 connections per host (up from 2) which should make Comet easier. # 5th March 2008, 6:28 pm

querySelector and querySelectorAll. WebKit now supports the W3C Selectors API. Expect the various JavaScript libraries to add this as an optimisation to achieve massive speedups (Prototype are already working on it). # 8th February 2008, 11:21 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

Live Query jQuery plugin. Ingenious plugin that lets you register jQuery event bindings to be executed when a new element matching the provided selector is added to the DOM. Performance is kept snappy by only running the check after a jQuery DOM manipulation method has been executed (append, prepend, attr etc); it won’t notice elements added using regular DOM methods. # 22nd August 2007, 10:01 pm

base2. Dean Edwards’ new JavaScript library which adds useful cross-browser features based on upcoming DOM standards (the Selectors API, DOMContentLoaded, addEventListener and more). # 23rd March 2007, 5:59 pm