From ab20d8208ae6df3cbbc4e34c28f109a5c3d8a04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 2 Sep 2025 11:15:38 +0200 Subject: [PATCH] Add caniuse links or comments where the (normalized) IDs match This covers all cases where the web-features and caniuse IDs are the same if hyphens are removed. Some are "false friends" and comments were added to avoid them being matched in the future. --- features/accelerometer.yml | 1 + features/background-clip-text.yml | 1 + features/background-sync.yml | 1 + features/gyroscope.yml | 1 + features/intl-plural-rules.yml | 1 + features/json.yml | 1 + features/link-rel-preconnect.yml | 1 + features/magnetometer.yml | 1 + features/menu.yml | 2 ++ features/multi-column.yml | 1 + features/mutation-events.yml | 1 + features/mutationobserver.yml | 1 + features/orientation-sensor.yml | 1 + features/outline.yml | 2 ++ features/outlines.yml | 4 ++-- features/payment-request.yml | 1 + features/pdf-viewer.yml | 2 ++ features/prefers-color-scheme.yml | 1 + features/registerprotocolhandler.yml | 1 + features/template-literals.yml | 1 + features/upgrade-insecure-requests.yml | 1 + features/vibration.yml | 1 + features/xml-serializer.yml | 2 ++ 23 files changed, 28 insertions(+), 2 deletions(-) diff --git a/features/accelerometer.yml b/features/accelerometer.yml index a020dad7b30..793be008b14 100644 --- a/features/accelerometer.yml +++ b/features/accelerometer.yml @@ -1,6 +1,7 @@ name: Accelerometer description: The `Accelerometer`, `LinearAccelerationSensor` and `GravitySensor` APIs read the acceleration applied to a device in three dimensions, either including the effect of gravity, without its effect, or only its effect, respectively. spec: https://w3c.github.io/accelerometer/ +caniuse: accelerometer group: sensors status: compute_from: diff --git a/features/background-clip-text.yml b/features/background-clip-text.yml index b4368df37a8..2289be13175 100644 --- a/features/background-clip-text.yml +++ b/features/background-clip-text.yml @@ -2,4 +2,5 @@ name: "background-clip: text" description: "The `background-clip: text` CSS declaration draws the background underneath only the text in the element." spec: https://drafts.csswg.org/css-backgrounds-4/#background-clip +caniuse: background-clip-text group: background diff --git a/features/background-sync.yml b/features/background-sync.yml index 25a6810d39c..d5f1a3323a5 100644 --- a/features/background-sync.yml +++ b/features/background-sync.yml @@ -1,6 +1,7 @@ name: Background sync description: The background synchronization API registers a service worker callback to run only when the device is no longer offline. You can use this to let users continue using your app while offline and synchronize with a server after reconnecting. spec: https://wicg.github.io/background-sync/spec/ +caniuse: background-sync status: compute_from: api.SyncManager compat_features: diff --git a/features/gyroscope.yml b/features/gyroscope.yml index 3fca269fa0a..b2a32a71be6 100644 --- a/features/gyroscope.yml +++ b/features/gyroscope.yml @@ -1,6 +1,7 @@ name: Gyroscope description: The `Gyroscope` API reads the angular velocity of a device in three dimensions. spec: https://w3c.github.io/gyroscope/#gyroscope-interface +caniuse: gyroscope group: sensors status: compute_from: api.Gyroscope diff --git a/features/intl-plural-rules.yml b/features/intl-plural-rules.yml index 8aae46b160c..52fde7ae028 100644 --- a/features/intl-plural-rules.yml +++ b/features/intl-plural-rules.yml @@ -2,6 +2,7 @@ name: Intl.PluralRules description: "The `Intl.PluralRules` API creates a locale-aware object that tells you which of the language's pluralization rules apply based on a given number." group: intl spec: https://tc39.es/ecma402/#pluralrules-objects +caniuse: intl-pluralrules status: compute_from: javascript.builtins.Intl.PluralRules compat_features: diff --git a/features/json.yml b/features/json.yml index 7ddff692442..a968a859e4d 100644 --- a/features/json.yml +++ b/features/json.yml @@ -2,6 +2,7 @@ name: JSON description: The `JSON` API provides static methods for parsing values from and converting values to JavaScript Object Notation (JSON), a serialization format for objects, arrays, numbers, strings, Boolean values, and null. group: json spec: https://tc39.es/ecma262/multipage/structured-data.html#sec-json-object +caniuse: json status: compute_from: javascript.builtins.JSON compat_features: diff --git a/features/link-rel-preconnect.yml b/features/link-rel-preconnect.yml index 675b2e43d23..590d1384964 100644 --- a/features/link-rel-preconnect.yml +++ b/features/link-rel-preconnect.yml @@ -1,5 +1,6 @@ name: '' description: The `rel="preconnect"` attribute for the `` HTML element is a hint to the browser that the page or user is likely to request resources from another origin, so the browser should preemptively start a connection to the `href` value's origin. spec: https://html.spec.whatwg.org/multipage/links.html#link-type-preconnect +caniuse: link-rel-preconnect compat_features: - html.elements.link.rel.preconnect diff --git a/features/magnetometer.yml b/features/magnetometer.yml index 49e2090fbe5..fc9635b3133 100644 --- a/features/magnetometer.yml +++ b/features/magnetometer.yml @@ -1,6 +1,7 @@ name: Magnetometer description: The `Magnetometer` API reads magnetic field sensor data from the device's magnetometer. spec: https://w3c.github.io/magnetometer/ +caniuse: magnetometer group: sensors compat_features: - api.Magnetometer diff --git a/features/menu.yml b/features/menu.yml index 932552fc430..717c0b6fa45 100644 --- a/features/menu.yml +++ b/features/menu.yml @@ -1,6 +1,8 @@ name: description: The `` element represents an unordered list of action items (`
  • `), such as a toolbar. It is a semantic alternative to the `
      ` element. spec: https://html.spec.whatwg.org/multipage/grouping-content.html#menus +# https://caniuse.com/menu is not linked here because it's for the +# element, a historical Firefox-only feature. group: html-elements # TODO: Tag relevant parts of api.HTMLLIElement when possible: # https://github.com/web-platform-dx/web-features/issues/1173 diff --git a/features/multi-column.yml b/features/multi-column.yml index 91edf7c29c3..f74a89eafc5 100644 --- a/features/multi-column.yml +++ b/features/multi-column.yml @@ -1,6 +1,7 @@ name: Multi-column layout description: Multi-column layout flows an element's content across one or more columns in a single row, without affecting the `display` property of its children. spec: https://drafts.csswg.org/css-multicol-1/ +caniuse: multicolumn group: multi-column status: compute_from: css.properties.columns diff --git a/features/mutation-events.yml b/features/mutation-events.yml index f8457161128..1db5e39bc37 100644 --- a/features/mutation-events.yml +++ b/features/mutation-events.yml @@ -2,6 +2,7 @@ name: Mutation events description: Mutation events like `DOMSubtreeModified`, `DOMNodeInserted`, or `DOMNodeRemoved` fire when DOM changes occur. # The latest spec doesn't mention them at all anymore. spec: https://w3c.github.io/uievents/ +caniuse: mutation-events group: dom discouraged: according_to: diff --git a/features/mutationobserver.yml b/features/mutationobserver.yml index e87b42160ea..03aac4cdbfe 100644 --- a/features/mutationobserver.yml +++ b/features/mutationobserver.yml @@ -1,6 +1,7 @@ name: MutationObserver description: The `MutationObserver` API watches for changes to the DOM tree and calls a callback function when DOM changes occur. spec: https://dom.spec.whatwg.org/#interface-mutationobserver +caniuse: mutationobserver group: dom compat_features: - api.MutationObserver diff --git a/features/orientation-sensor.yml b/features/orientation-sensor.yml index 64523350fae..9bf8eaeccf8 100644 --- a/features/orientation-sensor.yml +++ b/features/orientation-sensor.yml @@ -3,6 +3,7 @@ description: The `AbsoluteOrientationSensor` and `RelativeOrientationSensor` API spec: - https://w3c.github.io/orientation-sensor/#absoluteorientationsensor-interface - https://w3c.github.io/orientation-sensor/#relativeorientationsensor-interface +caniuse: orientation-sensor group: sensors compat_features: - api.OrientationSensor diff --git a/features/outline.yml b/features/outline.yml index b852e8de9a6..d2d2c39d274 100644 --- a/features/outline.yml +++ b/features/outline.yml @@ -1,5 +1,7 @@ name: outline description: The `outline` CSS shorthand sets the color, style, and width of a line around an element, outside of the border. spec: https://drafts.csswg.org/css-ui-4/#outline +# https://caniuse.com/outline is not linked because it covers both shorthand and +# longhands, which are split in web-features. TODO: merge the features. compat_features: - css.properties.outline diff --git a/features/outlines.yml b/features/outlines.yml index 50469ccdd7e..b32fdcfe8cf 100644 --- a/features/outlines.yml +++ b/features/outlines.yml @@ -1,8 +1,8 @@ name: Outlines description: The `outline-color`, `outline-style`, and `outline-width` and `outline-offset` CSS properties style a line around an element, outside of the border. spec: https://drafts.csswg.org/css-ui-4/#outline -# TODO: Caniuse support is close but would need to be reconciled. -# caniuse: outline +# https://caniuse.com/outline is not linked because it covers both shorthand and +# longhands, which are split in web-features. TODO: merge the features. compat_features: - css.properties.outline-color - css.properties.outline-offset diff --git a/features/payment-request.yml b/features/payment-request.yml index 87dca1f8617..b9f7128b564 100644 --- a/features/payment-request.yml +++ b/features/payment-request.yml @@ -1,6 +1,7 @@ name: Payment request description: The `PaymentRequest` API prompts the user to make a payment through the browser's user interface. spec: https://w3c.github.io/payment-request/ +caniuse: payment-request group: payments status: compute_from: api.PaymentRequest diff --git a/features/pdf-viewer.yml b/features/pdf-viewer.yml index e32ee046c21..83f50aeba41 100644 --- a/features/pdf-viewer.yml +++ b/features/pdf-viewer.yml @@ -1,5 +1,7 @@ name: pdfViewerEnabled description: The `navigator.pdfViewerEnabled` property is a boolean for whether the browser navigates to and shows a PDF in the browser window or downloads the PDF. spec: https://html.spec.whatwg.org/multipage/system-state.html#pdf-viewing-support +# Note: https://caniuse.com/pdf-viewer is not linked because it covers the +# built-in PDF viewer, which is much older than navigator.pdfViewerEnabled. compat_features: - api.Navigator.pdfViewerEnabled diff --git a/features/prefers-color-scheme.yml b/features/prefers-color-scheme.yml index de3fcf287bd..cf50f4bd445 100644 --- a/features/prefers-color-scheme.yml +++ b/features/prefers-color-scheme.yml @@ -1,6 +1,7 @@ name: prefers-color-scheme media query description: The `prefers-color-scheme` CSS media query sets styles based on the requested color scheme, light or dark. spec: https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme +caniuse: prefers-color-scheme group: media-queries status: compute_from: css.at-rules.media.prefers-color-scheme diff --git a/features/registerprotocolhandler.yml b/features/registerprotocolhandler.yml index 5a115ce0228..0e6279dbb8c 100644 --- a/features/registerprotocolhandler.yml +++ b/features/registerprotocolhandler.yml @@ -1,6 +1,7 @@ name: registerProtocolHandler description: "The `navigator.registerProtocolHandler()` method declares a site's ability to handle an address scheme (also known as a protocol). For example, an email site can register to open `mailto:` URLs or a VoIP site to open `tel:` URLs." spec: https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers +caniuse: registerprotocolhandler status: compute_from: api.Navigator.registerProtocolHandler compat_features: diff --git a/features/template-literals.yml b/features/template-literals.yml index d0a42204e87..7079e46de1b 100644 --- a/features/template-literals.yml +++ b/features/template-literals.yml @@ -1,6 +1,7 @@ name: Template literals description: Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded expressions, and special constructs called tagged templates. spec: https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-template-literals +caniuse: template-literals group: javascript compat_features: - javascript.grammar.template_literals diff --git a/features/upgrade-insecure-requests.yml b/features/upgrade-insecure-requests.yml index 76021dc7aae..4777dc1d3b3 100644 --- a/features/upgrade-insecure-requests.yml +++ b/features/upgrade-insecure-requests.yml @@ -1,6 +1,7 @@ name: Upgrade insecure requests description: The `Upgrade-Insecure-Requests` HTTP request header tells the server that the response should redirect to a secure (HTTPS) resource. spec: https://w3c.github.io/webappsec-upgrade-insecure-requests/ +caniuse: upgradeinsecurerequests group: security compat_features: - http.headers.Upgrade-Insecure-Requests diff --git a/features/vibration.yml b/features/vibration.yml index f3e4d75d73a..df63bd72f59 100644 --- a/features/vibration.yml +++ b/features/vibration.yml @@ -1,5 +1,6 @@ name: Vibration description: The `navigator.vibrate()` method makes a tactile alert, if the device is equipped with a haptic motor. spec: https://w3c.github.io/vibration/ +caniuse: vibration compat_features: - api.Navigator.vibrate diff --git a/features/xml-serializer.yml b/features/xml-serializer.yml index 7e4cb7f4947..86547a3e9ab 100644 --- a/features/xml-serializer.yml +++ b/features/xml-serializer.yml @@ -1,6 +1,8 @@ name: XMLSerializer description: The `XMLSerializer` API provides the `serializeToString()` method to construct an XML string representing a DOM tree. spec: https://w3c.github.io/DOM-Parsing/#the-xmlserializer-interface +# https://caniuse.com/xml-serializer is not linked because it covers all of +# DOMParser, XMLSerializer, innerHTML, outerHTML and insertAdjacentHTML. group: - parsing-and-serialization - xml