How should we represents features implemented on different interfaces.
Nobody has claimed this yet.
- Dominant language
- JSON
- Stars
- 5.8k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 186
Description
We have instances of what seem to be the same feature implemented on different interfaces in different browsers. Here are two examples:
animationend,animationiteration, andanimationstartare implemented onWindowin Chrome, but onDocumentin other browsers. (See #3583)delegatesFocusmay be implemented onElementfor some browsers, but is implemented onShadowRootfor Chrome. (See #3580)
These two instances are likely the result of spec changes. My guess is that Chrome is behind the spec change in the first item, but ahead of it in the second.
It seems like alternative_name could be used for this. So under api.Window.animationend.chrome would be "alternative_name": "Document.animationend". And api.Document.animationend.chorme would have "alternative_name": "Window.animationend". That would provide enough information for a consuming app to locate the alternative data.
Disambiguation between this and cases where the alternative is not also a key is easily handled in code.
// Getting the alt tree is a little more complicated, so I went simple to make the point.
const altTree = bcd[altName];
if (altTree) {
// Render the data.
}
If this is the correct approach and no schema change is needed, then this is merely a documentation change and I'll submit a PR for it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the examples in this issue and the related issues #3583 and #3580, then inspect the browser-compat-data schema and validation guidance. Determine whether alternative_name can represent cross-interface implementations or whether a schema change is needed. Done means the representation is agreed and either documented in the data guidance or specified for implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100