Skip to content

Commit

Permalink
Add href guarantee for elements, bump minor version of package (#1169)
Browse files Browse the repository at this point in the history
  • Loading branch information
tidoust authored Feb 23, 2024
1 parent e402813 commit f7f0994
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Data curation brings the following guarantees.
### Elements extracts

- All Web IDL interfaces referenced by elements exist in Web IDL extracts.
- All elements link back to their definition in the spec.

### Events extracts

Expand Down
5 changes: 4 additions & 1 deletion packages/elements/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ elements.listAll().then(all => {
});
```

For each spec, value is an object with a `spec` property that describes the specification, and an `elements` property that lists elements defined in the spec, as an array of objects with `name`, `interface` and `obsolete` properties. The `interface` property is not present for elements that do not implement an interface:
For each spec, value is an object with a `spec` property that describes the specification, and an `elements` property that lists elements defined in the spec, as an array of objects with `name`, `interface`, `href`, and `obsolete` properties. The `interface` property is not present for elements that do not implement an interface:

```js
const elements = require('@webref/elements');
Expand All @@ -38,10 +38,13 @@ elements.listAll().then(all => {
});
```

The `href` property is the URL to the definition of the element in the specification. The property is always set.

The `obsolete` property is a boolean flag, only present (and set to `true`) for elements that are obsolete.


# Guarantees

The following guarantees are provided by this package:
- All Web IDL interfaces exist in the latest version of the [`@webref/idl` package](https://www.npmjs.com/package/@webref/idl) at the time the `@webref/elements` package is released.
- All elements link back to their definition in the spec.
2 changes: 1 addition & 1 deletion packages/elements/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@webref/elements",
"description": "Markup elements of the Web platform and associated Web IDL interfaces",
"version": "2.2.3",
"version": "2.3.0",
"repository": {
"type": "git",
"url": "https://github.com/w3c/webref.git"
Expand Down

0 comments on commit f7f0994

Please sign in to comment.