Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add href guarantee for elements, bump minor version of package #1169

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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