Intent to Ship: Web Bluetooth: Make BluetoothRemoteGATTServer an EventTarget

302 views
Skip to first unread message

Helmut Januschka

unread,
Sep 29, 2026, 1:20:04 PMSep 29
to blink-dev
Contact emails
hjanu...@gmail.com

Explainer
https://github.com/WebBluetoothCG/web-bluetooth/pull/672

Specification
https://pr-preview.s3.amazonaws.com/hjanuschka/web-bluetooth/pull/672.html#bluetoothremotegattserver

Summary
BluetoothRemoteGATTServer inherits from EventTarget, exposing the standard addEventListener(), removeEventListener(), and dispatchEvent() methods. This enables connection-level events to be dispatched directly on the GATT server.

Blink component
Blink>Bluetooth

Web Feature ID
web-bluetooth

Motivation
BluetoothRemoteGATTServer represents an active GATT connection and needs to host connection-level events. Making it an EventTarget gives web applications the standard event-listener API needed by events such as the separately proposed maxwritewithoutresponsesizechanged event.

Initial public proposal
https://github.com/WebBluetoothCG/web-bluetooth/pull/672

Search tags
web-bluetooth, bluetooth, eventtarget

TAG review
No information provided

TAG review status
Issues addressed

Goals for experimentation
None

Risks


Interoperability and Compatibility
This is a small but observable change to an existing interface. Existing content could be affected if it relies on BluetoothRemoteGATTServer not having addEventListener(), relies on an instance not being an instanceof EventTarget, or enumerates inherited properties and does not expect EventTarget members. The affected surface is limited to sites using Web Bluetooth. Firefox and Safari do not currently implement Web Bluetooth.

Gecko: Negative (https://github.com/mozilla/standards-positions/issues/95) Firefox does not implement Web Bluetooth. The citation is Mozilla's position on the overall Web Bluetooth API, not a separate position on this inheritance change.

WebKit: Oppose (https://github.com/WebKit/standards-positions/issues/570) Safari does not implement Web Bluetooth. The citation is WebKit's position on the overall Web Bluetooth API, not a separate position on this inheritance change.

Web developers: Positive this is a small preparation feature for the larger demanded: https://issues.chromium.org/issues/40265040

Other signals: The WebBluetoothCG specification change is approved in https://github.com/WebBluetoothCG/web-bluetooth/pull/672 but has not yet merged.

Ergonomics
Low. EventTarget is the standard event-listener pattern used throughout the web platform. The change does not add synchronous work, thread constraints, or performance-sensitive behavior. It prepares BluetoothRemoteGATTServer to expose connection-level events alongside the existing Web Bluetooth APIs.

Activation
Low. Developers use the standard addEventListener() API and need no polyfill or library. This inheritance change alone does not require application changes; developers use it when connection-level events are exposed.

Security
This exposes only the standard EventTarget methods on an existing Web Bluetooth object. It does not grant access to additional devices, services, characteristics, data, or operations. Existing Web Bluetooth permission, secure-context, service allowlist, blocklist, and Permissions Policy protections remain unchanged.

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None. Android WebView does not expose Web Bluetooth, so BluetoothRemoteGATTServer is not available there.


Debuggability
The inherited EventTarget methods and registered listeners are inspectable using the existing DevTools Console and event-listener tools. No dedicated DevTools panel or protocol support is required.

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
No
Supported on Windows, macOS, Linux, ChromeOS, and Android wherever Web Bluetooth is available. Chrome on iOS and Android WebView do not expose Web Bluetooth.

Is this feature fully tested by web-platform-tests?
No
Chromium's global interface listing tests verify that BluetoothRemoteGATTServer inherits from EventTarget: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/webexposed/global-interface-listing.html The Web Bluetooth WPT IDL harness will cover the same inheritance after specification PR 672 merges and the generated Web Bluetooth IDL snapshot is updated: https://github.com/web-platform-tests/wpt/blob/master/bluetooth/bidi/idl/idlharness.tentative.https.window.js https://github.com/WebBluetoothCG/web-bluetooth/pull/672

Flag name on about://flags
No information provided

Finch feature name
No information provided

Non-finch justification
Blink cannot conditionally enable Web IDL inheritance. The inheritance change has therefore been isolated into a standalone implementation CL and shipping intent.

Rollout plan
Will ship enabled for all users

Requires code in //chrome?
False

Tracking bug
https://issues.chromium.org/issues/40265040

Measurement
No dedicated UseCounter is added for the inheritance change. Exposure and use remain associated with the existing web-bluetooth Web Feature ID. The change is also covered by Chromium's global interface listing tests.

Estimated milestones

Shipping on desktop

157

Shipping on Android

157

Shipping on WebView

157

Shipping on iOS

157


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

The inheritance change is included in WebBluetoothCG PR 672. The PR is approved and no further substantive changes to this inheritance are anticipated, but it must merge before shipping.

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5138797158334464?gate=6155787868176384

This intent message was generated by Chrome Platform Status.


this is a "formal" feature, its a formal necessity for proceeding with https://chromestatus.com/feature/5177569273053184

to make this easier in the future, i prepared a issue/cl - to make inheritance feature flaggable, and reduce similiar feature entry requirements for changes like this!




Chris Harrelson

unread,
Sep 30, 2026, 11:24:52 AMSep 30
to Helmut Januschka, blink-dev
LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/9c0d3b76-5d3d-4ff2-8537-131e89331e5cn%40chromium.org.

Philip Jägenstedt

unread,
Oct 1, 2026, 5:02:41 AMOct 1
to Chris Harrelson, Helmut Januschka, blink-dev

Rick Byers

unread,
Oct 21, 2026, 12:38:09 PM (5 days ago) Oct 21
to Philip Jägenstedt, Chris Harrelson, Helmut Januschka, blink-dev
FYI I had LGTM3'd on Oct 7 but apparently dropped blink-dev from the thread. Sorry!


Reply all
Reply to author
Forward
0 new messages