[web-bluetooth] Update 'script execution context' reference to refer to a `Bluetooth` instance

jyasskin has just created a new issue for 
https://github.com/WebBluetoothCG/web-bluetooth:

== Update 'script execution context' reference to refer to a 
`Bluetooth` instance ==
The spec currently refers to the [script execution 
context](https://html.spec.whatwg.org/multipage/webappapis.html#script-execution-environment)
 to make sure each bluetooth device, service, etc. only gets one 
`BluetoothDevice`, `BluetoothGattService`, etc. instance. However, 
that term no longer exists in HTML. @domenic suggests making one 
`BluetoothDevice`, etc. instance per 
[`Bluetooth`](https://webbluetoothcg.github.io/web-bluetooth/#bluetooth)
 instance instead, which exists once per global object, and looking it
 up based on the `this` argument to whatever method was called.

I believe the alternative is to look up the right `BluetoothDevice`, 
etc. instance on the [entry settings 
object](https://html.spec.whatwg.org/multipage/webappapis.html#entry-settings-object),
 which gives different, and I think less intuitive results if realm1 
calls into realm2's navigator.bluetooth object. 

I think Chromium's current implementation effectively uses the entry 
settings object, but we'll try to change to match the spec.

@bzbarsky, does that all sound right? Is there any wording in WebIDL 
or elsewhere I should be using?

Please view or discuss this issue at 
https://github.com/WebBluetoothCG/web-bluetooth/issues/196 using your 
GitHub account

Received on Monday, 11 January 2016 23:08:28 UTC