Skip to content
Permalink
Browse files

Update language for User Activation v2 (#470)

* Update language for User Activation v2

This change updates the "request Bluetooth devices" algorithm to refer
to the User Activation v2 model. The algorithm now has to be triggered
while its relevant global object has a transient activation before being
allowed to continue.

* Update scanning.bs for User Activation v2
  • Loading branch information
odejesush committed Feb 11, 2020
1 parent 9991588 commit 4ca7ccbcfc5d2d37e9e026c73be99eb5837d2256
Showing with 13 additions and 6 deletions.
  1. +5 −2 index.bs
  2. +8 −4 scanning.bs
@@ -1270,8 +1270,11 @@ spec: webidl
</p>
<ol>
<li id="requestDevice-user-gesture">
If the algorithm is not <a>triggered by user activation</a>,
throw a {{SecurityError}} and abort these steps.
Check that the algorithm is triggered while its [=relevant global
object=] has a <a
href="https://html.spec.whatwg.org/#tracking-user-activation"> transient
activation</a>, otherwise throw a {{SecurityError}} and abort these
steps.
</li>
<li>
In order to convert the arguments from service names and aliases to just <a>UUID</a>s,
@@ -209,9 +209,11 @@ spec:web-bluetooth
asking the user for permission if they haven't yet granted it.
</p>
<p>
Because this could show a prompt,
it requires a <a>secure context</a>,
and UAs are likely to require a <a lt="triggered by user activation">user gesture</a>.
Because this could show a prompt, it requires a <a>secure context</a>.
Additionally, UAs are likely to require a <a
href="https://html.spec.whatwg.org/#tracking-user-activation"> transient
user activation</a> on its [=relevant global object=] when
{{requestLEScan}} is called.
</p>
<p>
Advertising events that <a for="BluetoothLEScanFilter">match</a>
@@ -276,7 +278,9 @@ spec:web-bluetooth
}
</pre>

Note: This may require that this algorithm was <a>triggered by user activation</a>.
Note: This may require that this algorithm has a <a
href="https://html.spec.whatwg.org/#tracking-user-activation"> transient
activation</a> on its [=relevant global object=] when triggered.
</li>
<li>
If the result is {{"denied"}},

0 comments on commit 4ca7ccb

Please sign in to comment.
You can’t perform that action at this time.