mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 21:49:42 +00:00
26 lines
932 B
Text
26 lines
932 B
Text
#import <DOM/EventHandler.idl>
|
|
#import <Serial/SerialPort.idl>
|
|
|
|
// https://wicg.github.io/serial/#serial-interface
|
|
[Exposed=(DedicatedWorker, Window), SecureContext]
|
|
interface Serial : EventTarget {
|
|
attribute EventHandler onconnect;
|
|
attribute EventHandler ondisconnect;
|
|
Promise<sequence<SerialPort>> getPorts();
|
|
[Exposed=Window] Promise<SerialPort> requestPort(optional SerialPortRequestOptions options = {});
|
|
};
|
|
|
|
// https://wicg.github.io/serial/#serialportfilter-dictionary
|
|
dictionary SerialPortFilter {
|
|
unsigned short usbVendorId;
|
|
unsigned short usbProductId;
|
|
// FIXME: Should be a BluetoothServiceUUID
|
|
DOMString bluetoothServiceClassId;
|
|
};
|
|
|
|
// https://wicg.github.io/serial/#serialportrequestoptions-dictionary
|
|
dictionary SerialPortRequestOptions {
|
|
sequence<SerialPortFilter> filters;
|
|
// FIXME: Should be a BluetoothServiceUUID
|
|
sequence<DOMString> allowedBluetoothServiceClassIds;
|
|
};
|