-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathautomatic-reconnect.html
More file actions
executable file
·38 lines (30 loc) · 1001 Bytes
/
automatic-reconnect.html
File metadata and controls
executable file
·38 lines (30 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
feature_name: Web Bluetooth / Automatic Reconnect
chrome_version: 52
check_min_version: true
feature_id: 5264933985976320
icon_url: icon.png
index: index.html
---
{% include_relative _includes/intro.html %}
<p>This sample illustrates the use of the Web Bluetooth API to reconnect to a
disconnected Bluetooth device using a simple <a
href="https://en.wikipedia.org/wiki/Exponential_backoff">exponential backoff
algorithm</a>. You may want to check out the <a
href="automatic-reconnect-async-await.html">Automatic Reconnect (Async Await)</a> sample.</p>
<form>
<button>Scan</button>
</form>
{% include output_helper.html %}
{% include js_snippet.html filename='automatic-reconnect.js' %}
<script>
document.querySelector('button').addEventListener('click', function(event) {
event.stopPropagation();
event.preventDefault();
if (isWebBluetoothEnabled()) {
ChromeSamples.clearLog();
onButtonClick();
}
});
</script>
{% include_relative _includes/utils.html %}