You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-guidelines/index.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,52 @@ Do not set `deprecated` to `true` for features that are merely old or unpopular,
197
197
198
198
This guideline was proposed in [#15703](https://github.com/mdn/browser-compat-data/pull/15703). See [mdn/content#5549](https://github.com/mdn/content/discussions/5549) and [#10490](https://github.com/mdn/browser-compat-data/issues/10490) for further discussion on the use of "deprecated."
199
199
200
+
## Behavioral subfeatures
201
+
202
+
> ![NOTE]
203
+
> This guideline was added in August 2025 and feedback is welcome.
204
+
> If you have questions or concerns about how to apply it, [file an issue](https://github.com/mdn/browser-compat-data/issues/new/choose).
205
+
206
+
A behavioral subfeature records support for some facet, nuance, or evolution of a parent feature, where the behavior doesn't have a natural identifier (like CSS properties, API methods, or HTTP headers do).
207
+
Due to the lack of a natural identifier, a behavioral subfeature must have a `description`.
208
+
209
+
If a more specific guideline applies, follow that guideline instead of this one. See:
Do not create a subfeature when the behavioral subfeature's `support` data would be the same, across all browsers, as the parent feature.
217
+
For serious bugs affecting a single engine, consider using `partial_implementation` instead. <!-- TODO: link to partial_implementation guidelines, when available -->
218
+
219
+
You may create a behavioral subfeature for the following types of browser behaviors:
220
+
221
+
- A contextual support condition that is not readily feature detectable.
222
+
This type of behavioral subfeature typically describes the applicability of a feature to specific context.
223
+
224
+
- Behavioral evolution that is not readily feature detectable.
225
+
This type of behavioral subfeature typically describes consequences of specification changes that appeared after the feature first shipped in one or more browsers or user interface changes that appeared after implementers learned more about the specification.
226
+
227
+
Here are some example situations:
228
+
229
+
- A CSS property may depend on the layout context.
230
+
The CSS property `gap` has different support histories in flex and grid layouts, so it has the behavioral subfeatures of `css.properties.gap.flex_context` and `css.properties.gap.grid_context`.
231
+
See [`css.properties.gap`](https://github.com/mdn/browser-compat-data/blob/main/css/properties/gap.json).
232
+
233
+
- An API exposure may depend on an execution context.
234
+
The `setTimeout()` method has different support histories for worker support, so it has the behavioral subfeatures of `api.setTimeout.worker_support`.
235
+
See the guideline for [`worker_support`](./api.md#web-workers-worker_support) for further guidance.
236
+
237
+
- An API's specified behavior may change after a feature ships in one or more browsers.
238
+
The `play()` method of the `HTMLMediaElement` interface originally consumed a callback instead of returning a promise, so it has the behavioral subfeature of `api.HTMLMediaElement.play.returns_promise`.
239
+
See the guideline for [`returns_promise`](./api.md#methods-returning-promises-returns_promise) for further guidance.
240
+
241
+
- User interface behavior may evolve with better understanding of a specification.
242
+
The `inert` HTML attribute marks elements as non-interactive but this did not originally affect find-in-page search, so it has the behavioral subfeature of [`html.global_attributes.inert.ignores_find_in_page`](https://github.com/mdn/browser-compat-data/blob/behavioral-subfeature-guideline/html/global_attributes.json).
243
+
244
+
This guideline was proposed and adopted in [#26781](https://github.com/mdn/browser-compat-data/pull/26781).
245
+
200
246
## Parameters and parameter object features
201
247
202
248
Sometimes it's useful to represent support for specific parameters (also known as arguments) of a function or method, as a subfeature of the function itself. To record data about whether a specific parameter is supported by a function or method, use the following naming conventions:
-**Browser addition/removal** – [Data guidelines for browser data](./data-guidelines/browsers.md#addition-of-browsers)
12
13
-**Browser data** – [Data guidelines for browser data](./data-guidelines/browsers.md)
13
14
-**Browser versions** – [Matching web features to browser release version numbers](./matching-browser-releases/index.md#matching-web-features-to-browser-release-version-numbers)
0 commit comments