GoogleChrome / GoogleChrome/samples

bluetooth: Replace custom anyDevice() function with acceptAllDevices filter

Open
#411 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
2.4k
Avg merge
24m
Merged PRs (30d)
2

Description

Some Bluetooth samples emulate upcoming `acceptAllDevices` filter with a custom function called anyDevice. When `acceptAllDevices` filter is implemented, let's replace it.

``` diff
result = navigator.bluetooth.requestDevice(
- {filters: anyDevice(), optionalServices: ['battery_service']})
+ {{acceptAllDevices: true}, optionalServices: ['battery_service']})

Source: https://github.com/WebBluetoothCG/web-bluetooth/pull/278
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.