Skip to content

Commit

Permalink
Fix bikeshed issue with 'denied' (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois committed Mar 24, 2023
1 parent 696bb7a commit f044b76
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ spec: html
spec: webidl
type: dfn
text: resolve
spec: permissions-1
type: enum-value
text: "denied"
</pre>

<style>
Expand Down Expand Up @@ -1335,10 +1332,10 @@ all devices can match, a sequence of {{BluetoothServiceUUID}}s,
1. Let |state| be |descriptor|'s <a>permission state</a>.

<div class="note">
Note: |state| will be {{"denied"}} in <a>non-secure contexts</a> because
Note: |state| will be "{{PermissionState/denied}}" in <a>non-secure contexts</a> because
powerful features can't be used in <a>non-secure contexts</a>.
</div>
1. If |state| is {{"denied"}}, return `[]` and abort these steps.
1. If |state| is "{{PermissionState/denied}}", return `[]` and abort these steps.
1. If the UA can prove that no devices could possibly be found in the next step,
for example because there is no Bluetooth adapter with which to scan, or
because the filters can't be matched by any possible advertising packet, the
Expand Down Expand Up @@ -1376,7 +1373,7 @@ all devices can match, a sequence of {{BluetoothServiceUUID}}s,
|optionalManufacturerData| to appear in its
{{AllowedBluetoothDevice/allowedManufacturerData}} list.
</div>
1. If |device| is {{"denied"}}, return `[]` and abort these steps.
1. If |device| is "{{PermissionState/denied}}", return `[]` and abort these steps.
1. The UA MAY <a>populate the Bluetooth cache</a> with all Services inside
<var>device</var>. Ignore any errors from this step.
1. <a>Get the <code>BluetoothDevice</code> representing</a> <var>device</var>
Expand Down Expand Up @@ -1730,7 +1727,7 @@ permission-related algorithms and types are defined as follows:
<var>status</var>.
1. Set <code><var>status</var>.{{PermissionStatus/state}}</code> to |desc|'s
<a>permission state</a>.
1. If <code>|status|.{{PermissionStatus/state}}</code> is {{"denied"}}, set
1. If <code>|status|.{{PermissionStatus/state}}</code> is "{{PermissionState/denied}}", set
<code>|status|.devices</code> to an empty {{FrozenArray}} and abort
these steps.
1. Let <var>matchingDevices</var> be a new {{Array}}.
Expand Down

0 comments on commit f044b76

Please sign in to comment.