Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/component/query
Query the DOM with selector engine fallback support
https://github.com/component/query
Last synced: 12 days ago
JSON representation
Query the DOM with selector engine fallback support
- Host: GitHub
- URL: https://github.com/component/query
- Owner: component
- Created: 2013-03-14T23:12:58.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-10T22:13:10.000Z (almost 11 years ago)
- Last Synced: 2024-11-11T18:29:07.415Z (about 2 months ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 24
- Watchers: 9
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# query
Query the DOM with selector engine fallback support. This abstraction
allows all other components that require dom querying to indirectly support
old browsers, without explicitly adding support for them.## Installation
$ component install component/query
## API
### query(selector, [el])
Query `selector` against the document or `el`
and return a single match.```js
query('ul > li');
query('ul > li', articles);
```### query.all(selector, [el])
Query `selector` against the document or `el`
and return all matches.```js
query.all('ul > li');
query.all('ul > li', articles);
```## Fallback engines
Currently supported:
- [query-zest](https://github.com/component/query-zest)
- [query-qwery](https://github.com/jamischarles/query-qwery)## License
MIT