UNPKG

webbluetooth

Version:

Node.js implementation of the Web Bluetooth Specification

28 lines 57.9 kB
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BluetoothDeviceImpl | Node Web Bluetooth</title><meta name="description" content="Documentation for Node Web Bluetooth"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Node Web Bluetooth</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">Node Web Bluetooth</a></li><li><a href="../modules/device.html">device</a></li><li><a href="device.BluetoothDeviceImpl.html">BluetoothDeviceImpl</a></li></ul><h1>Class BluetoothDeviceImpl</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Bluetooth Device class</p> </div><div class="tsd-comment tsd-typography"></div></section><section class="tsd-panel tsd-hierarchy" data-refl="587"><h4>Hierarchy</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-signature-type">EventDispatcher</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">BluetoothDeviceEvents</span><span class="tsd-signature-symbol">&gt;</span><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">BluetoothDeviceImpl</span></li></ul></li></ul></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">BluetoothDevice</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L47">src/device.ts:47</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="device.BluetoothDeviceImpl.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a> </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="device.BluetoothDeviceImpl.html#emitter" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>emitter</span></a> <a href="device.BluetoothDeviceImpl.html#gatt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>gatt</span></a> <a href="device.BluetoothDeviceImpl.html#id" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a> <a href="device.BluetoothDeviceImpl.html#name" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>name</span></a> <a href="device.BluetoothDeviceImpl.html#watchingadvertisements" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>watching<wbr/>Advertisements</span></a> </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="device.BluetoothDeviceImpl.html#onadvertisementreceived" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>onadvertisementreceived</span></a> <a href="device.BluetoothDeviceImpl.html#oncharacteristicvaluechanged" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>oncharacteristicvaluechanged</span></a> <a href="device.BluetoothDeviceImpl.html#ongattserverdisconnected" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>ongattserverdisconnected</span></a> <a href="device.BluetoothDeviceImpl.html#onserviceadded" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>onserviceadded</span></a> <a href="device.BluetoothDeviceImpl.html#onservicechanged" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>onservicechanged</span></a> <a href="device.BluetoothDeviceImpl.html#onserviceremoved" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Accessor"><use href="../assets/icons.svg#icon-262144"></use></svg><span>onserviceremoved</span></a> </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="device.BluetoothDeviceImpl.html#addeventlistener" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Event<wbr/>Listener</span></a> <a href="device.BluetoothDeviceImpl.html#dispatchevent" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>dispatch<wbr/>Event</span></a> <a href="device.BluetoothDeviceImpl.html#forget" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>forget</span></a> <a href="device.BluetoothDeviceImpl.html#removeeventlistener" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Event<wbr/>Listener</span></a> <a href="device.BluetoothDeviceImpl.html#unwatchadvertisements" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unwatch<wbr/>Advertisements</span></a> <a href="device.BluetoothDeviceImpl.html#watchadvertisements" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>watch<wbr/>Advertisements</span></a> </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorbluetoothdeviceimpl" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">BluetoothDeviceImpl</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">init</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="device.BluetoothDeviceImpl.html" class="tsd-signature-type tsd-kind-class">BluetoothDeviceImpl</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">forgetFn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="device.BluetoothDeviceImpl.html" class="tsd-signature-type tsd-kind-class">BluetoothDeviceImpl</a><a href="#constructorbluetoothdeviceimpl" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Device constructor</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">init</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="device.BluetoothDeviceImpl.html" class="tsd-signature-type tsd-kind-class">BluetoothDeviceImpl</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>A partial class to initialise values</p> </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">forgetFn</span>: <span class="tsd-signature-symbol">()</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="device.BluetoothDeviceImpl.html" class="tsd-signature-type tsd-kind-class">BluetoothDeviceImpl</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides EventDispatcher&lt;BluetoothDeviceEvents&gt;.constructor</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L171">src/device.ts:171</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="emitter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>emitter</span><a href="#emitter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">emitter</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">DefaultEventMap</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><p>Inherited from EventDispatcher.emitter</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/events.ts#L32">src/events.ts:32</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="gatt" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>gatt</span><a href="#gatt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">gatt</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BluetoothRemoteGATTServer</span><span class="tsd-signature-symbol"> = undefined</span></div><div class="tsd-comment tsd-typography"><p>The gatt server of the device</p> </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of BluetoothDevice.gatt</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L62">src/device.ts:62</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="id" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>id</span><a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = undefined</span></div><div class="tsd-comment tsd-typography"><p>The unique identifier of the device</p> </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of BluetoothDevice.id</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L52">src/device.ts:52</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="name" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>name</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = undefined</span></div><div class="tsd-comment tsd-typography"><p>The name of the device</p> </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of BluetoothDevice.name</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L57">src/device.ts:57</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="watchingadvertisements" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>watching<wbr/>Advertisements</span><a href="#watchingadvertisements" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">watchingAdvertisements</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><div class="tsd-comment tsd-typography"><p>Whether adverts are being watched (not implemented)</p> </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of BluetoothDevice.watchingAdvertisements</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L67">src/device.ts:67</a></li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Accessors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Accessors</h2></summary><section><section class="tsd-panel tsd-member"><a id="onadvertisementreceived" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>onadvertisementreceived</span><a href="#onadvertisementreceived" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature" id="onadvertisementreceived-1"><span class="tsd-signature-keyword">set</span> <span class="tsd-kind-set-signature">onadvertisementreceived</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.onadvertisementreceived</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L156">src/device.ts:156</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="oncharacteristicvaluechanged" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>oncharacteristicvaluechanged</span><a href="#oncharacteristicvaluechanged" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature" id="oncharacteristicvaluechanged-1"><span class="tsd-signature-keyword">set</span> <span class="tsd-kind-set-signature">oncharacteristicvaluechanged</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.oncharacteristicvaluechanged</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L96">src/device.ts:96</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="ongattserverdisconnected" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ongattserverdisconnected</span><a href="#ongattserverdisconnected" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature" id="ongattserverdisconnected-1"><span class="tsd-signature-keyword">set</span> <span class="tsd-kind-set-signature">ongattserverdisconnected</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.ongattserverdisconnected</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L144">src/device.ts:144</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="onserviceadded" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>onserviceadded</span><a href="#onserviceadded" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature" id="onserviceadded-1"><span class="tsd-signature-keyword">set</span> <span class="tsd-kind-set-signature">onserviceadded</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.onserviceadded</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L108">src/device.ts:108</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="onservicechanged" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>onservicechanged</span><a href="#onservicechanged" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature" id="onservicechanged-1"><span class="tsd-signature-keyword">set</span> <span class="tsd-kind-set-signature">onservicechanged</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.onservicechanged</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L120">src/device.ts:120</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="onserviceremoved" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>onserviceremoved</span><a href="#onserviceremoved" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature" id="onserviceremoved-1"><span class="tsd-signature-keyword">set</span> <span class="tsd-kind-set-signature">onserviceremoved</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.onserviceremoved</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L132">src/device.ts:132</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="addeventlistener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>add<wbr/>Event<wbr/>Listener</span><a href="#addeventlistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="addeventlistener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">addEventListener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="device.BluetoothDeviceImpl.html#addeventlistenerk">K</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">type</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#addeventlistenerk">K</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">this</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#addeventlistenerk">K</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#addeventlistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="addeventlistenerk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#addeventlistenerk">K</a></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">this</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#addeventlistenerk">K</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.addEventListener</p><p>Inherited from EventDispatcher.addEventListener</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/events.ts#L37">src/events.ts:37</a></li></ul></aside></div></li><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="addeventlistener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">addEventListener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="device.BluetoothDeviceImpl.html#addeventlistenerk-1">K</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">type</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#addeventlistenerk-1">K</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventListener</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#addeventlistener-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="addeventlistenerk-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#addeventlistenerk-1">K</a></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-type">EventListener</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.addEventListener</p><p>Inherited from EventDispatcher.addEventListener</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/events.ts#L38">src/events.ts:38</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="dispatchevent" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>dispatch<wbr/>Event</span><a href="#dispatchevent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="dispatchevent-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">dispatchEvent</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#dispatchevent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">Event</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.dispatchEvent</p><p>Inherited from EventDispatcher.dispatchEvent</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/events.ts#L55">src/events.ts:55</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="forget" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>forget</span><a href="#forget" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="forget-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">forget</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#forget-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Forget this device</p> </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of BluetoothDevice.forget</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L204">src/device.ts:204</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="removeeventlistener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Event<wbr/>Listener</span><a href="#removeeventlistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="removeeventlistener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeEventListener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="device.BluetoothDeviceImpl.html#removeeventlistenerk">K</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">type</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#removeeventlistenerk">K</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">this</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#removeeventlistenerk">K</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#removeeventlistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="removeeventlistenerk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#removeeventlistenerk">K</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">this</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">ev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span><span class="tsd-signature-symbol">[</span><a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#removeeventlistenerk">K</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.removeEventListener</p><p>Inherited from EventDispatcher.removeEventListener</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/events.ts#L46">src/events.ts:46</a></li></ul></aside></div></li><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link"><a id="removeeventlistener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeEventListener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="device.BluetoothDeviceImpl.html#removeeventlistenerk-1">K</a> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">type</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#removeeventlistenerk-1">K</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventListener</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#removeeventlistener-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="removeeventlistenerk-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span><span class="tsd-signature-keyword"> extends </span><span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-type">BluetoothDeviceEvents</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="bluetooth.BluetoothImpl.html#removeeventlistenerk-1">K</a></span></li><li><span><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-type">EventListener</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of BluetoothDevice.removeEventListener</p><p>Inherited from EventDispatcher.removeEventListener</p><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/events.ts#L47">src/events.ts:47</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="unwatchadvertisements" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>unwatch<wbr/>Advertisements</span><a href="#unwatchadvertisements" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="unwatchadvertisements-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">unwatchAdvertisements</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#unwatchadvertisements-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Stops watching adverts from this device (not implemented)</p> </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/thegecko/webbluetooth/blob/981ea0df096b4627631af9340957e2fa40dc4861/src/device.ts#L197">src/device.ts:197</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="watchadvertisements" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>watch<wbr/>Advertisements</span><a href="#watchadvertisements" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="watchadvertisements-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">watchAdvertisements</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#watchadvertisements-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div cl