Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add multiple contexts to docs

  • Loading branch information...
commit c4613069d2272c62d2cb43c64694471dca2cdfd2 1 parent 8e0cd51
@subtleGradient subtleGradient authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 README.md
View
7 README.md
@@ -29,13 +29,14 @@ Usage
Search this context for any nodes that match this selector.
Expects:
-* context: document or node
+* context: document or node or array of documents or nodes
* selector: String or SelectorObject
* (**optional**) append: Array or Object with a push method
Returns: append argument or Array of 0 or more nodes
Slick.search(document, "#foo > bar.baz") → [<bar>, <bar>, <bar>]
+ Slick.search([<ol>, <ul>], "li > a") → [<a>, <a>, <a>]
Slick.search(document, "#foo > bar.baz", { push:function(){} }) → { push:function(){}, 0:<bar>, 1:<bar>, 2:<bar> }
@@ -43,13 +44,13 @@ Returns: append argument or Array of 0 or more nodes
Find the first node in document that matches selector or null if none are found.
Expects:
-* context: document or node
+* context: document or node or array of documents or nodes
* selector: String or SelectorObject
Returns: Element or null
Slick.find(document, "#foo > bar.baz") → <bar>
- Slick.find(document, "#does-not-exist") → null
+ Slick.find(node, "#does-not-exist") → null
### node `match` selector?
Please sign in to comment.
Something went wrong with that request. Please try again.