web api interface
BluetoothDevice
Limited availabilitySecure context
The BluetoothDevice interface of the Web Bluetooth API represents a Bluetooth device inside a particular script execution environment.
Instance properties
idExperimental Read only- : A string that uniquely identifies a device.
nameExperimental Read only- : A string that provides a human-readable name for the device.
gattExperimental Read only- : A reference to the device’s
BluetoothRemoteGATTServer.
- : A reference to the device’s
Instance methods
watchAdvertisements()Experimental- : A
Promisethat resolves toundefinedor is rejected with an error if advertisements can’t be shown for any reason.
- : A
forget()Experimental- : Provides a way for the page to revoke access to a device the user has granted access to.
Events
Listen to these events using addEventListener() or by assigning an event listener to the oneventname property of this interface.
gattserverdisconnectedExperimental- : Fired on a device when an active GATT connection is lost.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.