Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. Bluetooth
  4. getDevices()

Bluetooth: getDevices() method

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

ThegetDevices() method of theBluetooth interface returns an array containing the Bluetooth devices that this origin is allowed to access — including those that are out of range and powered off.

Syntax

js
getDevices()

Parameters

None.

Return value

APromise that resolves with an array ofBluetoothDevice objects.

Exceptions

SecurityErrorDOMException

Thrown if this operation is not permitted in this context due tosecurity concerns, such as being called when access to the current document is blocked by thePermissions Policy directivebluetooth.

Specifications

Specification
Web Bluetooth
# dom-bluetooth-getdevices

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp