diff --git a/index.bs b/index.bs index 50c5eaf..b6d16b8 100644 --- a/index.bs +++ b/index.bs @@ -90,9 +90,9 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/browsing-the-web.h type: dfn text: initializing the Document object; url: initialise-the-document-object -spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/browsers.html# +spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/document-sequences.html# type: dfn - text: browsing context; url: browsing-context + text: navigable; url: navigable spec: WebIDL; urlPrefix: https://heycam.github.io/webidl/# type: dfn @@ -123,6 +123,7 @@ spec: html type: dfn text: browsing context; for: / text: global object; for: / + text: navigable; for: / spec: webidl type: dfn text: resolve @@ -1414,10 +1415,11 @@ steps: devices, but for now it only ever returns a single one. -1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not - [=allowed to use=] the [=policy-controlled feature=] named - "[=policy-controlled feature/bluetooth=]", throw a {{SecurityError}} and - abort these steps. +1. Let |document| be [=this=]'s [=relevant global object=]'s + [=associated Document=]. +1. If |document| is not [=allowed to use=] the [=policy-controlled feature=] + named "[=policy-controlled feature/bluetooth=]", throw a {{SecurityError}} + and abort these steps. 1.
Check that the algorithm is triggered while its [=relevant global object=] has a transient @@ -1482,7 +1484,7 @@ steps: 1. If |exclusionFilters| isn't `null`, remove devices from scanResult if they match a filter in uuidExclusionFilters. -1. Let |browsingContext| be [=this=]'s [=relevant global object=]'s [=browsing context=]. +1. Let |navigable| be |document|'s [=navigable=]. 1. Let |promptId| be a new unique opaque string. Issue: In practice, the device list is dynamically updated while a @@ -1491,7 +1493,7 @@ event might be emitted multiple times with the same `promptId` and the fresh device list. See https://github.com/WebBluetoothCG/web-bluetooth/issues/621. -1. [=Trigger a prompt updated event=] given |browsingContext|, |promptId|, and |scanResult|. +1. [=Trigger a prompt updated event=] given |navigable|, |promptId|, and |scanResult|. 1.
Even if scanResult is empty, prompt the user to choose one of the devices in |scanResult|, associated with |descriptor|, and let |device| be the result. @@ -1506,7 +1508,7 @@ https://github.com/WebBluetoothCG/web-bluetooth/issues/621. to indicate interest and then perform a privacy-disabled scan to retrieve the name. -1. [=map/Remove=] [=map of browsing contexts to device prompts=][|browsingContext|'s [=browsing context id=]]. +1. [=map/Remove=] [=map of navigables to device prompts=][|navigable|'s [=navigable id=]]. 1. The UA MAY add |device| to |storage|.
bluetooth.RequestDevicePromptUpdatedParameters
production with the context
field set to |context id|, the prompt
field set to |promptId|, and the devices
field set to |serialized devices|.
+1. Set [=map of navigables to device prompts=][|navigableId|] to |prompt|.
+1. Let |params| be a [=map=] matching the bluetooth.RequestDevicePromptUpdatedParameters
production with the context
field set to |navigableId|, the prompt
field set to |promptId|, and the devices
field set to |serialized devices|.
1. Let |body| be a [=map=] matching the bluetooth.RequestDevicePromptUpdated
production, with the params
field set to |params|.
-1. Let |related browsing contexts| be a [=/set=] containing |context|.
-1. For each |session| in the [=set of sessions for which an event is enabled=] given "bluetooth.requestDevicePromptUpdated
" and |related browsing contexts|:
+1. Let |related navigables| be a [=/set=] containing |navigable|.
+1. For each |session| in the [=set of sessions for which an event is enabled=] given "bluetooth.requestDevicePromptUpdated
" and |related navigables|:
1. [=Emit an event=] with |session| and |body|.