Elfin is a CSS3 selector engine for HTML documents written in pure JavaScript.
components: Elfin.parse -- the parser Elfin.get -- the getter
Building Elfin is very simple in Linux/Mac. Just run the build script.
On Windows you have to do it manually -- copy the contents of 'src' directory into a blank file in the order: init.js, parse.js, get.js, last.js. Save it as elfin.js.
Minify using YUI Compressor or something else you like.
To get an array of elements corresponding toa CSS3 selector, do
Elfin(expr, node)
or
Elfin.get(expr, node)
To get a parsed representation for a CSS3 selector, do
Elfin.parse(expr)
This returns a array that contains the output of the parser.
To see the features/bugs Elfin has discovered, do a for-in on
Elfin.has
For experimenting with Elfin, you don't need to build it. Just run the tester app.