MCPcopy Create free account
hub / github.com/GoogleChrome/samples / onStopButtonClick

Function onStopButtonClick

web-bluetooth/notifications.js:41–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41function onStopButtonClick() {
42 if (myCharacteristic) {
43 myCharacteristic.stopNotifications()
44 .then(_ => {
45 log('> Notifications stopped');
46 myCharacteristic.removeEventListener('characteristicvaluechanged',
47 handleNotifications);
48 })
49 .catch(error => {
50 log('Argh! ' + error);
51 });
52 }
53}
54
55function handleNotifications(event) {
56 let value = event.target.value;

Callers

nothing calls this directly

Calls 1

logFunction · 0.50

Tested by

no test coverage detected