a CSS selector engine in JS
Switch branches/tags
Nothing to show
Pull request Compare This branch is 263 commits behind fb55:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
README.md
browser_functions.js
index.js
package.json

README.md

##What?

CSSselect is CSS selector engine. It returns a function that tests elements if they match a selector - checking needs to happen "from the top", like browser engines execute queries.

##Why?

Just take the following CSS query: foo bar baz. When the element named baz has like a billion children, every one of them needs to be checked if they match a query. Three times, to be precise, if you run a CSS query from the start to the end (as e.g. JSDOM does). Yup, that's slow.

This library checks every element once. The more complex the query, the greater the benefit.

##How?

By stacking functions!

##TODO

  1. The API needs to be improved
  2. Documentation needs to be written