Skip to content

Commit

Permalink
Put the connection-checking wrapper note in its own paragraph.
Browse files Browse the repository at this point in the history
  • Loading branch information
jyasskin committed Mar 8, 2016
1 parent 7d590ba commit 6ebe5f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
14 changes: 7 additions & 7 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2252,14 +2252,14 @@ spec: webidl
</li>
</ol>

<p class="note">
Algorithms need to fail if
their {{BluetoothRemoteGATTServer}} was disconnected while they were running,
even if the UA stays connected the whole time
and the {{BluetoothRemoteGATTServer}} is subsequently re-connected before they finish.
We wrap the returned {{Promise}} to accomplish this.
</p>
<p>
<span class="note">
Algorithms need to fail if
their {{BluetoothRemoteGATTServer}} was disconnected while they were running,
even if the UA stays connected the whole time
and the {{BluetoothRemoteGATTServer}} is subsequently re-connected before they finish.
We wrap the returned {{Promise}} to accomplish this.
</span>
To create a <var>gattServer</var>-<dfn>connection-checking wrapper</dfn>
around a {{Promise}} <var>promise</var>, the UA MUST:
</p>
Expand Down
11 changes: 6 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2812,11 +2812,12 @@ <h3 class="heading settled dfn-paneled idl-code" data-dfn-type="interface" data-
with <code><var>device</var>@<code class="idl"><a data-link-type="idl" href="#dom-bluetoothdevice-representeddevice-slot" id="ref-for-dom-bluetoothdevice-representeddevice-slot-6">[[representedDevice]]</a></code></code> the <a data-link-type="dfn" href="#same-device" id="ref-for-same-device-8">same device</a> as <code>this.device@<code class="idl"><a data-link-type="idl" href="#dom-bluetoothdevice-representeddevice-slot" id="ref-for-dom-bluetoothdevice-representeddevice-slot-7">[[representedDevice]]</a></code></code>, <code>!<var>device</var>.gatt.<code class="idl"><a data-link-type="idl" href="#dom-bluetoothremotegattserver-connected" id="ref-for-dom-bluetoothremotegattserver-connected-6">connected</a></code></code>,
the UA SHOULD destroy <code><var>device</var>@<code class="idl"><a data-link-type="idl" href="#dom-bluetoothdevice-representeddevice-slot" id="ref-for-dom-bluetoothdevice-representeddevice-slot-8">[[representedDevice]]</a></code></code>’s <a data-link-type="dfn" href="#att-bearer" id="ref-for-att-bearer-4">ATT Bearer</a>.
</ol>
<p> <span class="note" role="note"> Algorithms need to fail if
their <code class="idl"><a data-link-type="idl" href="#bluetoothremotegattserver" id="ref-for-bluetoothremotegattserver-12">BluetoothRemoteGATTServer</a></code> was disconnected while they were running,
even if the UA stays connected the whole time
and the <code class="idl"><a data-link-type="idl" href="#bluetoothremotegattserver" id="ref-for-bluetoothremotegattserver-13">BluetoothRemoteGATTServer</a></code> is subsequently re-connected before they finish.
We wrap the returned <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects">Promise</a></code> to accomplish this. </span> To create a <var>gattServer</var>-<dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="connection-checking wrapper" data-noexport="" id="connection-checking-wrapper">connection-checking wrapper<span class="dfn-panel" data-deco=""><b><a href="#connection-checking-wrapper">#connection-checking-wrapper</a></b><b>Referenced in:</b><span><a href="#ref-for-connection-checking-wrapper-1">5.1.1. The Bluetooth cache</a></span><span><a href="#ref-for-connection-checking-wrapper-2">5.4. BluetoothRemoteGATTCharacteristic</a> <a href="#ref-for-connection-checking-wrapper-3">(2)</a></span><span><a href="#ref-for-connection-checking-wrapper-4">5.5. BluetoothRemoteGATTDescriptor</a> <a href="#ref-for-connection-checking-wrapper-5">(2)</a></span></span></dfn> around a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects">Promise</a></code> <var>promise</var>, the UA MUST: </p>
<p class="note" role="note"> Algorithms need to fail if
their <code class="idl"><a data-link-type="idl" href="#bluetoothremotegattserver" id="ref-for-bluetoothremotegattserver-12">BluetoothRemoteGATTServer</a></code> was disconnected while they were running,
even if the UA stays connected the whole time
and the <code class="idl"><a data-link-type="idl" href="#bluetoothremotegattserver" id="ref-for-bluetoothremotegattserver-13">BluetoothRemoteGATTServer</a></code> is subsequently re-connected before they finish.
We wrap the returned <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects">Promise</a></code> to accomplish this. </p>
<p> To create a <var>gattServer</var>-<dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="connection-checking wrapper" data-noexport="" id="connection-checking-wrapper">connection-checking wrapper<span class="dfn-panel" data-deco=""><b><a href="#connection-checking-wrapper">#connection-checking-wrapper</a></b><b>Referenced in:</b><span><a href="#ref-for-connection-checking-wrapper-1">5.1.1. The Bluetooth cache</a></span><span><a href="#ref-for-connection-checking-wrapper-2">5.4. BluetoothRemoteGATTCharacteristic</a> <a href="#ref-for-connection-checking-wrapper-3">(2)</a></span><span><a href="#ref-for-connection-checking-wrapper-4">5.5. BluetoothRemoteGATTDescriptor</a> <a href="#ref-for-connection-checking-wrapper-5">(2)</a></span></span></dfn> around a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects">Promise</a></code> <var>promise</var>, the UA MUST: </p>
<ol class="algorithm">
<li> If <code><var>gattServer</var>.connected</code> is <code>true</code>,
add <var>promise</var> to <code><var>gattServer</var>@<code class="idl"><a data-link-type="idl" href="#dom-bluetoothremotegattserver-activealgorithms-slot" id="ref-for-dom-bluetoothremotegattserver-activealgorithms-slot-2">[[activeAlgorithms]]</a></code></code>.
Expand Down

0 comments on commit 6ebe5f0

Please sign in to comment.