Re: [web-bluetooth] Add [SameObject] extended attribute to bluetooth

`[SameObject]` is used as well in 
https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/modules/mediastream/NavigatorUserMedia.idl
 and 
https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/modules/webusb/USBConnectionEvent.idl

```js
partial interface Navigator {
    [SameObject] readonly attribute MediaDevices mediaDevices;
};
```

```js
[
    Constructor(DOMString type, USBConnectionEventInit eventInitDict),
    OriginTrialEnabled=WebUSB,
] interface USBConnectionEvent : Event {
    [SameObject] readonly attribute USBDevice device;
};
```

So how about adding it to `referringDevice`?

```diff
interface Bluetooth {
  [SecureContext]
  Promise<boolean> getAvailability();
  [SecureContext]
  attribute EventHandler onavailabilitychanged;
  [SecureContext]
-  readonly attribute BluetoothDevice? referringDevice;
+  [SameObject] readonly attribute BluetoothDevice? referringDevice;
  [SecureContext]
  Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions
 options);
};

-- 
GitHub Notification of comment by beaufortfrancois
Please view or discuss this issue at 
https://github.com/WebBluetoothCG/web-bluetooth/pull/318#issuecomment-255972070
 using your GitHub account

Received on Tuesday, 25 October 2016 08:34:12 UTC