You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4fe8b2c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/api.md
+31-31Lines changed: 31 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,21 +11,21 @@ Query contexts default to the factory document when omitted. `closest()`, `first
11
11
12
12
| Method | Result |
13
13
| --- | --- |
14
-
|[`byClass(cls, context)`](../src/nwsapi.mts#L3014)| Returns elements with the class name. |
15
-
|[`byId(id, context)`](../src/nwsapi.mts#L3012)| Returns elements with the ID. Duplicate IDs are allowed by default. |
16
-
|[`byTag(tag, context)`](../src/nwsapi.mts#L3013)| Returns elements with the tag name. Use `*` for all elements. |
17
-
|[`closest(selectors, element, callback)`](../src/nwsapi.mts#L3020)| Returns the nearest match, starting with the element, or `null`. |
18
-
|[`compile(selector, mode, callback)`](../src/nwsapi.mts#L3022)| Compiles a selector into a resolver function. This is an advanced API. |
19
-
|[`configure(option, clear)`](../src/nwsapi.mts#L3023)| Reads or changes options. Pass `true` as the second argument to clear compiled selectors. |
20
-
|[`emit(message, proto)`](../src/nwsapi.mts#L3025)| Reports an error using the configured error policy. |
21
-
|[`first(selectors, context, callback)`](../src/nwsapi.mts#L3016)| Returns the first matching descendant, or `null`. |
22
-
|[`install(all)`](../src/nwsapi.mts#L3031)| Replaces native selector methods. Pass `true` to also replace collection methods. |
23
-
|[`match(selectors, element, callback)`](../src/nwsapi.mts#L3017)| Returns whether the element matches. |
24
-
|[`registerCombinator(combinator, resolver)`](../src/nwsapi.mts#L3038)| Adds a relationship between elements using trusted resolver code. |
25
-
|[`registerOperator(operator, resolver)`](../src/nwsapi.mts#L3063)| Adds an attribute operator using a resolver with `p1`, `p2`, and `p3` fields. |
26
-
|[`registerSelector(name, rexp, func)`](../src/nwsapi.mts#L3085)| Adds a selector pattern and a compiler callback that returns `source` and `status`. |
27
-
|[`select(selectors, context, callback)`](../src/nwsapi.mts#L3018)| Returns an array of matching descendants, or an empty array. |
28
-
|[`uninstall()`](../src/nwsapi.mts#L3032)| Restores the native methods saved by `install()`. |
14
+
|[`byClass(cls, context)`](../src/nwsapi.mts#L3069)| Returns elements with the class name. |
15
+
|[`byId(id, context)`](../src/nwsapi.mts#L3067)| Returns elements with the ID. Duplicate IDs are allowed by default. |
16
+
|[`byTag(tag, context)`](../src/nwsapi.mts#L3068)| Returns elements with the tag name. Use `*` for all elements. |
17
+
|[`closest(selectors, element, callback)`](../src/nwsapi.mts#L3075)| Returns the nearest match, starting with the element, or `null`. |
18
+
|[`compile(selector, mode, callback, relative)`](../src/nwsapi.mts#L3077)| Compiles a selector into a resolver function. This is an advanced API. |
19
+
|[`configure(option, clear)`](../src/nwsapi.mts#L3078)| Reads or changes options. Pass `true` as the second argument to clear compiled selectors. |
20
+
|[`emit(message, proto)`](../src/nwsapi.mts#L3080)| Reports an error using the configured error policy. |
21
+
|[`first(selectors, context, callback)`](../src/nwsapi.mts#L3071)| Returns the first matching descendant, or `null`. |
22
+
|[`install(all)`](../src/nwsapi.mts#L3086)| Replaces native selector methods. Pass `true` to also replace collection methods. |
23
+
|[`match(selectors, element, callback)`](../src/nwsapi.mts#L3072)| Returns whether the element matches. |
24
+
|[`registerCombinator(combinator, resolver)`](../src/nwsapi.mts#L3093)| Adds a relationship between elements using trusted resolver code. |
25
+
|[`registerOperator(operator, resolver)`](../src/nwsapi.mts#L3118)| Adds an attribute operator using a resolver with `p1`, `p2`, and `p3` fields. |
26
+
|[`registerSelector(name, rexp, func)`](../src/nwsapi.mts#L3140)| Adds a selector pattern and a compiler callback that returns `source` and `status`. |
27
+
|[`select(selectors, context, callback)`](../src/nwsapi.mts#L3073)| Returns an array of matching descendants, or an empty array. |
28
+
|[`uninstall()`](../src/nwsapi.mts#L3087)| Restores the native methods saved by `install()`. |
29
29
30
30
<details>
31
31
<summary>Configuration</summary>
@@ -60,22 +60,22 @@ These exports support extensions and debugging. Prefer query methods and `config
60
60
61
61
| Member | Purpose |
62
62
| --- | --- |
63
-
|[`CFG`](../src/nwsapi.mts#L3000)| Contains the compiler syntax settings. |
64
-
|[`Config`](../src/nwsapi.mts#L3026)| Contains the active options. Use `configure()` to change them. |
65
-
|[`M_BODY`](../src/nwsapi.mts#L3003)| Contains the matching resolver body template. |
66
-
|[`M_TEST`](../src/nwsapi.mts#L3007)| Contains the matching resolver test template. |
67
-
|[`matchLambdas`](../src/nwsapi.mts#L2992)| Caches compiled matching functions, not DOM results. |
68
-
|[`matchResolvers`](../src/nwsapi.mts#L2995)| Caches matching plans, not DOM results. |
69
-
|[`N_BODY`](../src/nwsapi.mts#L3004)| Exposes the matching resolver body template. |
70
-
|[`N_TEST`](../src/nwsapi.mts#L3008)| Contains the alternate resolver test template. |
0 commit comments