navigator.bluetooth.getAvailability().then((available) => {
if (available) {
console.log("This device supports Bluetooth!");
} else {
console.log("Doh! Bluetooth is not supported");
}
});Bluetooth: getAvailability() method / notebook
Bluetooth: getAvailability() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.