@webref/xref 1.1.1 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -0
- package/ed/dfns/attribution.json +17 -17
- package/ed/dfns/connection-allowlists.json +780 -0
- package/ed/dfns/did-resolution.json +17 -17
- package/ed/dfns/ecmascript.json +2 -2
- package/ed/dfns/encoding.json +20 -0
- package/ed/dfns/picture-in-picture.json +58 -18
- package/ed/dfns/pointerevents4.json +27 -0
- package/ed/dfns/rfc8610.json +6 -5
- package/ed/dfns/sanitizer-api.json +20 -0
- package/ed/dfns/shacl12-rules.json +181 -86
- package/ed/dfns/speech-api.json +22 -0
- package/ed/dfns/vc-recognized-entities.json +6 -6
- package/ed/dfns/web-smart-card.json +1065 -1151
- package/ed/dfns/webdriver-bidi.json +1748 -679
- package/ed/dfns/webmcp.json +164 -3
- package/ed/dfns/webnn.json +20 -0
- package/ed/dfns/webrtc-encoded-transform.json +28 -28
- package/ed/dfns/webrtc-ice.json +2 -2
- package/ed/headings/attribution.json +21 -0
- package/ed/headings/connection-allowlists.json +228 -0
- package/ed/headings/did-resolution.json +161 -92
- package/ed/headings/dom.json +1 -1
- package/ed/headings/ecmascript.json +1 -1
- package/ed/headings/encoding.json +1 -1
- package/ed/headings/picture-in-picture.json +5 -5
- package/ed/headings/rfc2397.json +33 -9
- package/ed/headings/rfc4120.json +164 -134
- package/ed/headings/rfc6386.json +128 -104
- package/ed/headings/rfc6454.json +62 -38
- package/ed/headings/rfc6455.json +120 -90
- package/ed/headings/rfc6797.json +104 -80
- package/ed/headings/rfc7034.json +52 -28
- package/ed/headings/rfc7239.json +55 -31
- package/ed/headings/rfc7469.json +63 -39
- package/ed/headings/rfc7578.json +54 -30
- package/ed/headings/rfc7932.json +70 -40
- package/ed/headings/rfc8610.json +93 -63
- package/ed/headings/rfc8878.json +97 -88
- package/ed/headings/rfc9163.json +62 -59
- package/ed/headings/rfc9649.json +82 -79
- package/ed/headings/rfc9659.json +33 -30
- package/ed/headings/secure-payment-confirmation.json +1 -1
- package/ed/headings/selectors-5.json +8 -1
- package/ed/headings/service-workers.json +1 -1
- package/ed/headings/shacl12-rules.json +125 -85
- package/ed/headings/soft-navigations.json +1 -1
- package/ed/headings/storage-access.json +2 -2
- package/ed/headings/vc-data-model-2.1.json +72 -72
- package/ed/headings/vc-jose-cose.json +70 -70
- package/ed/headings/vc-recognized-entities.json +62 -32
- package/ed/headings/web-smart-card.json +106 -217
- package/ed/headings/webdriver-bidi.json +25 -4
- package/ed/headings/webidl.json +1 -1
- package/ed/headings/webmcp.json +14 -0
- package/ed/headings/webnn.json +1 -1
- package/ed/headings/webrtc-encoded-transform.json +1 -1
- package/ed/headings/webusb.json +1 -1
- package/ed/headings/webvtt1.json +2 -2
- package/index.js +56 -8
- package/package.json +1 -1
- package/specs.json +28925 -0
- package/tr/dfns/attribution.json +17 -17
- package/tr/dfns/did-resolution.json +17 -17
- package/tr/dfns/picture-in-picture.json +58 -18
- package/tr/dfns/pointerevents4.json +27 -0
- package/tr/dfns/shacl12-rules.json +181 -86
- package/tr/dfns/webdriver-bidi.json +1748 -679
- package/tr/dfns/webnn.json +20 -0
- package/tr/dfns/webrtc-encoded-transform.json +28 -28
- package/tr/dfns/webvtt1.json +82 -95
- package/tr/headings/attribution.json +21 -0
- package/tr/headings/did-resolution.json +161 -92
- package/tr/headings/picture-in-picture.json +5 -5
- package/tr/headings/secure-payment-confirmation.json +1 -1
- package/tr/headings/service-workers.json +1 -1
- package/tr/headings/shacl12-rules.json +125 -85
- package/tr/headings/webauthn-3.json +9 -2
- package/tr/headings/webdriver-bidi.json +25 -4
- package/tr/headings/webnn.json +1 -1
- package/tr/headings/webrtc-encoded-transform.json +1 -1
- package/tr/headings/webvtt1.json +3 -9
package/README.md
CHANGED
|
@@ -38,6 +38,83 @@ for (const url of urls) {
|
|
|
38
38
|
|
|
39
39
|
*Note:* The function returns an array because the same URL may be used for a dfn and a heading.
|
|
40
40
|
|
|
41
|
+
The `lookup()` function takes the URL to search for as first parameter. It also accepts a [lookup options](#lookup-options) object as second parameter.
|
|
42
|
+
|
|
43
|
+
### Lookup options
|
|
44
|
+
|
|
45
|
+
*Note:* Lookup options apply as a logical AND when combined.
|
|
46
|
+
|
|
47
|
+
#### `series` option
|
|
48
|
+
|
|
49
|
+
By default, the `lookup()` function assumes that the provided URL uses the nightly or release URL of a spec. Set the `series` boolean flag to find definitions and headings that match a URL that uses the [series](https://github.com/w3c/browser-specs/#series) URL of a spec.
|
|
50
|
+
|
|
51
|
+
Internally, the series URL gets converted to the nightly or release URL of the spec known to be the [current spec](https://github.com/w3c/browser-specs/#seriescurrentspecification) in the series.
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
import * as xref from '@webref/xref';
|
|
55
|
+
xref.setup();
|
|
56
|
+
|
|
57
|
+
// URL that targets the CSS Paged Media Module series
|
|
58
|
+
const url = 'https://www.w3.org/TR/css-page/#page-selector';
|
|
59
|
+
|
|
60
|
+
// Default lookup won't return anything
|
|
61
|
+
const notfound = xref.lookup(url);
|
|
62
|
+
|
|
63
|
+
// With the `series` flag, lookup will convert the series
|
|
64
|
+
// URL to the URL of the current spec in the series. As of
|
|
65
|
+
// May 2026, the current spec in the css-page series is
|
|
66
|
+
// css-page-3. Returned dfn will have the URL:
|
|
67
|
+
// https://www.w3.org/TR/css-page-3/#page-selector
|
|
68
|
+
const found = xref.lookup(url, { series: true });
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
*Note:* The flag may be set even when the provided URL is not a series URL, lookup will just proceed as usual in this case.
|
|
72
|
+
|
|
73
|
+
#### `standing` option
|
|
74
|
+
|
|
75
|
+
The cross-references database contains definitions and headings from all crawled specs. The list of crawled specs in Webref matches the list of specs in [`browser-specs`](https://github.com/w3c/browser-specs) whose [`standing`](https://github.com/w3c/browser-specs/#standing) property is `"good"` or `"pending"`. For historical reasons, the list also include a few specific specs whose standing is `"discontinued"` (such as the DOM Level 2 Style spec).
|
|
76
|
+
|
|
77
|
+
Set the `standing` option to one of the possible standing values to only keep results from specs whose standing match the specified one.
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
import * as xref from '@webref/xref';
|
|
81
|
+
xref.setup();
|
|
82
|
+
|
|
83
|
+
// As of May 2026, the Direct Sockets proposal is "pending"
|
|
84
|
+
const url = 'https://wicg.github.io/direct-sockets/#dfn-readable';
|
|
85
|
+
|
|
86
|
+
// Default lookup will return a dfn
|
|
87
|
+
const found = xref.lookup(url);
|
|
88
|
+
|
|
89
|
+
// No result if lookup is restricted to specs in good standing
|
|
90
|
+
const notfound = xref.lookup(url, { standing: 'good' });
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
#### `version` option
|
|
94
|
+
|
|
95
|
+
The cross-references database contains definitions and headings from both nightly and release versions of the specs.
|
|
96
|
+
|
|
97
|
+
Set the `version` option to one of `"nightly"` or `"release"` to only return results from the underlying version of a spec.
|
|
98
|
+
|
|
99
|
+
```js
|
|
100
|
+
import * as xref from '@webref/xref';
|
|
101
|
+
xref.setup();
|
|
102
|
+
|
|
103
|
+
// A URL that targets the release version of a spec
|
|
104
|
+
const url = 'https://www.w3.org/TR/css-page-3/#page-selector';
|
|
105
|
+
|
|
106
|
+
// Default lookup will return a dfn
|
|
107
|
+
const found = xref.lookup(url);
|
|
108
|
+
|
|
109
|
+
// No result if lookup is restricted to nightly versions
|
|
110
|
+
const notfound = xref.lookup(url, { version: 'nightly' });
|
|
111
|
+
|
|
112
|
+
// Note: This option is a convenience method for the
|
|
113
|
+
// following, which achieves the exact same thing
|
|
114
|
+
const same = xref.lookup(url)
|
|
115
|
+
.filter(match => match.entry.version === 'nightly');
|
|
116
|
+
```
|
|
117
|
+
|
|
41
118
|
## Lookup matches
|
|
42
119
|
|
|
43
120
|
A match returned by the `lookup()` function is an object with two keys: `source` and `entry`.
|
package/ed/dfns/attribution.json
CHANGED
|
@@ -137,10 +137,10 @@
|
|
|
137
137
|
"access": "private",
|
|
138
138
|
"informative": false,
|
|
139
139
|
"heading": {
|
|
140
|
-
"id": "overview",
|
|
141
|
-
"href": "https://w3c.github.io/attribution/#overview",
|
|
142
|
-
"title": "
|
|
143
|
-
"number": "2"
|
|
140
|
+
"id": "overview-conversion",
|
|
141
|
+
"href": "https://w3c.github.io/attribution/#overview-conversion",
|
|
142
|
+
"title": "Conversions or Querying Impressions",
|
|
143
|
+
"number": "2.2"
|
|
144
144
|
},
|
|
145
145
|
"definedIn": "prose",
|
|
146
146
|
"links": []
|
|
@@ -157,10 +157,10 @@
|
|
|
157
157
|
"access": "private",
|
|
158
158
|
"informative": false,
|
|
159
159
|
"heading": {
|
|
160
|
-
"id": "overview",
|
|
161
|
-
"href": "https://w3c.github.io/attribution/#overview",
|
|
162
|
-
"title": "
|
|
163
|
-
"number": "2"
|
|
160
|
+
"id": "overview-aggregation",
|
|
161
|
+
"href": "https://w3c.github.io/attribution/#overview-aggregation",
|
|
162
|
+
"title": "Aggregation",
|
|
163
|
+
"number": "2.3"
|
|
164
164
|
},
|
|
165
165
|
"definedIn": "prose",
|
|
166
166
|
"links": []
|
|
@@ -830,10 +830,10 @@
|
|
|
830
830
|
"links": []
|
|
831
831
|
},
|
|
832
832
|
{
|
|
833
|
-
"id": "dom-attributionconversionoptions-
|
|
834
|
-
"href": "https://w3c.github.io/attribution/#dom-attributionconversionoptions-
|
|
833
|
+
"id": "dom-attributionconversionoptions-value",
|
|
834
|
+
"href": "https://w3c.github.io/attribution/#dom-attributionconversionoptions-value",
|
|
835
835
|
"linkingText": [
|
|
836
|
-
"
|
|
836
|
+
"value"
|
|
837
837
|
],
|
|
838
838
|
"localLinkingText": [],
|
|
839
839
|
"type": "dict-member",
|
|
@@ -852,10 +852,10 @@
|
|
|
852
852
|
"links": []
|
|
853
853
|
},
|
|
854
854
|
{
|
|
855
|
-
"id": "dom-attributionconversionoptions-
|
|
856
|
-
"href": "https://w3c.github.io/attribution/#dom-attributionconversionoptions-
|
|
855
|
+
"id": "dom-attributionconversionoptions-maxvalue",
|
|
856
|
+
"href": "https://w3c.github.io/attribution/#dom-attributionconversionoptions-maxvalue",
|
|
857
857
|
"linkingText": [
|
|
858
|
-
"
|
|
858
|
+
"maxValue"
|
|
859
859
|
],
|
|
860
860
|
"localLinkingText": [],
|
|
861
861
|
"type": "dict-member",
|
|
@@ -874,10 +874,10 @@
|
|
|
874
874
|
"links": []
|
|
875
875
|
},
|
|
876
876
|
{
|
|
877
|
-
"id": "dom-attributionconversionoptions-
|
|
878
|
-
"href": "https://w3c.github.io/attribution/#dom-attributionconversionoptions-
|
|
877
|
+
"id": "dom-attributionconversionoptions-credit",
|
|
878
|
+
"href": "https://w3c.github.io/attribution/#dom-attributionconversionoptions-credit",
|
|
879
879
|
"linkingText": [
|
|
880
|
-
"
|
|
880
|
+
"credit"
|
|
881
881
|
],
|
|
882
882
|
"localLinkingText": [],
|
|
883
883
|
"type": "dict-member",
|