mirror of
https://github.com/servo/servo.git
synced 2025-07-08 16:03:40 +01:00
Auto merge of #15367 - szeged:bluetooth-webidl, r=nox
Update WebBluetooth webidl files <!-- Please describe your changes on the following line: --> Update the WebBluetooth related webidl files with the `[SameObject]` extended attribute, and unify the indentation in these files. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15367) <!-- Reviewable:end -->
This commit is contained in:
commit
b3ae74b5c9
10 changed files with 48 additions and 45 deletions
|
@ -30,19 +30,15 @@ dictionary RequestDeviceOptions {
|
|||
[Pref="dom.bluetooth.enabled"]
|
||||
interface Bluetooth : EventTarget {
|
||||
// [SecureContext]
|
||||
// readonly attribute BluetoothDevice? referringDevice;
|
||||
attribute EventHandler onavailabilitychanged;
|
||||
// [SecureContext]
|
||||
// Promise<boolean> getAvailability();
|
||||
// [SecureContext]
|
||||
// attribute EventHandler onavailabilitychanged;
|
||||
// [SecureContext]
|
||||
[SecureContext]
|
||||
attribute EventHandler onavailabilitychanged;
|
||||
// [SecureContext, SameObject]
|
||||
// readonly attribute BluetoothDevice? referringDevice;
|
||||
[SecureContext]
|
||||
Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options);
|
||||
};
|
||||
|
||||
// Bluetooth implements EventTarget;
|
||||
// Bluetooth implements BluetoothDeviceEventHandlers;
|
||||
// Bluetooth implements CharacteristicEventHandlers;
|
||||
// Bluetooth implements ServiceEventHandlers;
|
||||
|
|
|
@ -12,13 +12,16 @@ interface BluetoothServiceDataMap {
|
|||
};*/
|
||||
[Pref="dom.bluetooth.enabled", Constructor(DOMString type, BluetoothAdvertisingEventInit init)]
|
||||
interface BluetoothAdvertisingEvent : Event {
|
||||
[SameObject]
|
||||
readonly attribute BluetoothDevice device;
|
||||
// readonly attribute FrozenArray<UUID> uuids;
|
||||
readonly attribute DOMString? name;
|
||||
readonly attribute unsigned short? appearance;
|
||||
readonly attribute byte? txPower;
|
||||
readonly attribute byte? rssi;
|
||||
// [SameObject]
|
||||
// readonly attribute BluetoothManufacturerDataMap manufacturerData;
|
||||
// [SameObject]
|
||||
// readonly attribute BluetoothServiceDataMap serviceData;
|
||||
};
|
||||
dictionary BluetoothAdvertisingEventInit : EventInit {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
[Pref="dom.bluetooth.enabled"]
|
||||
interface BluetoothRemoteGATTCharacteristic : EventTarget {
|
||||
[SameObject]
|
||||
readonly attribute BluetoothRemoteGATTService service;
|
||||
readonly attribute DOMString uuid;
|
||||
readonly attribute BluetoothCharacteristicProperties properties;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
[Pref="dom.bluetooth.enabled"]
|
||||
interface BluetoothRemoteGATTDescriptor {
|
||||
[SameObject]
|
||||
readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
|
||||
readonly attribute DOMString uuid;
|
||||
readonly attribute ByteString? value;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
[Pref="dom.bluetooth.enabled"]
|
||||
interface BluetoothRemoteGATTServer {
|
||||
[SameObject]
|
||||
readonly attribute BluetoothDevice device;
|
||||
readonly attribute boolean connected;
|
||||
Promise<BluetoothRemoteGATTServer> connect();
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
[Pref="dom.bluetooth.enabled"]
|
||||
interface BluetoothRemoteGATTService : EventTarget {
|
||||
[SameObject]
|
||||
readonly attribute BluetoothDevice device;
|
||||
readonly attribute DOMString uuid;
|
||||
readonly attribute boolean isPrimary;
|
||||
|
|
|
@ -28,7 +28,7 @@ interface NavigatorID {
|
|||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#navigator-extensions
|
||||
partial interface Navigator {
|
||||
readonly attribute Bluetooth bluetooth;
|
||||
[SameObject, Pref="dom.bluetooth.enabled"] readonly attribute Bluetooth bluetooth;
|
||||
};
|
||||
|
||||
// https://w3c.github.io/ServiceWorker/#navigator-service-worker
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue