Neither BluetoothDiscovery nor BluetoothInteraction should inherit from ScriptWrappable. Instead, Bluetooth should inherit from BluetoothDiscovery, BluetoothInteraction, and ScriptWrappable.
[NoInterfaceObject]
interface Bluetooth {
};
Bluetooth implements BluetoothDiscovery;
Bluetooth implements BluetoothInteraction;
The JavaScript prototype structure that this specification implies is as follows:
[Instance object]
-- proto -->
[Bluetooth prototype]
In particular, neither the BluetoothDiscovery prototype nor the BluetoothInteraction prototype is on the prototype chains. Instead, the Bluetooth prototype has own properties for each of the member functions from the BluetoothDiscovery and BluetoothInteraction interfaces.
Said another way, instances of the Bluetooth interface conform to the duck type you would expect from BluetoothDiscovery and BluetoothInteraction but these instance object don't have an "is a" relationship with the BluetoothDiscovery and BluetoothInteraction interfaces.
Compare with how the Element interface is specified:
interface Element : Node {
[...]
]
In this case, instances of the Element interface have the Node prototype on their prototype chain has have an "is a" relationship with the Node interface. In this case, in C++, Element doesn't inherit from ScriptWrappable. Instead, it inherits the ScriptWrappable base class through Node.
Hope that helps,
Adam