Re: [web-bluetooth] "current settings object's relevant global object" is not defined (#593)

What do you think of this?

> When a [document](https://dom.spec.whatwg.org/#concept-document)'s [visibility state](https://www.w3.org/TR/page-visibility-2/#dom-visibilitystate) changes,
> 1. Let _document_ be the [document](https://dom.spec.whatwg.org/#concept-document).
> 1. Let _global_ be _document_'s [relevant global object](https://html.spec.whatwg.org/multipage/webappapis.html#concept-relevant-global).
> 1. Queue a task on the Bluetooth event source with global and the following steps,
>    1. If _document_’s [visibility state](https://www.w3.org/TR/page-visibility-2/#dom-visibilitystate) is not "visible", then [abort all active watchAdvertisements](https://webbluetoothcg.github.io/web-bluetooth/#abort-all-active-watchadvertisements) operations on _global_.

I'm unsure when I want to use the "document" concept vs. the "Document" interface.

To get the `Bluetooth` instance from a document it seems like I should go through the [associated Navigator](https://html.spec.whatwg.org/multipage/system-state.html#associated-navigator) (given _global_) and define a similar "associated Bluetooth" concept which is used in the getter steps for the "bluetooth" attribute in the Navigator partial interface.

-- 
GitHub Notification of comment by reillyeon
Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/593#issuecomment-1253059529 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 21 September 2022 00:45:34 UTC