Open
Description
We currently have a 'subfeature_earlier_implementation' check, which would if for example the data claims that api.Document.title (document.title
) was introduced before api.Document (document
) itself.
This is an instance of one feature depending on another, but there are many more like this:
- APIs that were introduced together, where shipping just one of them would make no sense, for example
fetch()
without aResponse
interface (however incomplete) would make no sense. - An interface that inherits from another, for example
VTTCue
inherits fromTextTrackCue
. api.VTTCue without api.TextTrackCue support is almost certainly an error. - An attribute of a certain type requires that type to exist. For example
element.classList
requiresDOMTokenList
.
More generalized, we have:
- Implication: an entry/feature A that depends on another B, i.e., A ⇒ B and !B ⇒ !A (extremely common)
- Equivalence: entries that must have matching support data, i.e., A ⇔ B (fairly rare)
A lot of this could be derived from Web IDL definitions. The lint for this could have a set of version dependencies, something like this:
[
["api.VTTCue", ">=", "api.TextTrackCue"],
["api.WindowOrWorkerGlobalScope.fetch", "==", "api.Response"]
]
This was inspired by #6564.