-
-
Notifications
You must be signed in to change notification settings - Fork 53
Home
Fast CSS selectors API engine with zero dependencies that works in Node.js and browsers.
NWSAPI builds on NWMATCHER with Selectors Level 4 features such as :is(), :where(), and :has(), plus state selectors such as :open and :modal. See the selector support and compatibility notes.
The current 2.3.0-prerelease records 36 of 36 lower all-results medians, with 32 queries at least 2× faster, against jsdom's default dom-selector engine. First matches are 1.6–8.2× faster across 12 nonempty component queries. These are recorded warm-query fixtures; see the measurements and scope.
These are warm-query results on specific fixtures, using Node.js 26.5.0, jsdom 30.0.1, and dom-selector 8.3.2. NWSAPI is called directly; jsdom's public methods include integration overhead. Some margins are near noise and five all-results cases remain slower. See Performance for the workload, raw results, and limits.
- Get started: browser, Node.js factory, and jsdom adapter setup.
- API reference: query methods, configuration, extensions, and adapter APIs.
- CSS supported selectors: implemented syntax, host-dependent states, and known gaps.
- Features and compliance: runtime requirements, caching, compatibility, and testing.
- Performance: current results and reproduction commands.
- Contributor and WPT setup.
These pages describe current master, labeled 2.3.0-prerelease. Features and benchmark results may differ from a published package version.