#import #import // https://wicg.github.io/serial/#serial-interface [Exposed=(DedicatedWorker, Window), SecureContext] interface Serial : EventTarget { attribute EventHandler onconnect; attribute EventHandler ondisconnect; Promise> getPorts(); [Exposed=Window] Promise 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 filters; // FIXME: Should be a BluetoothServiceUUID sequence allowedBluetoothServiceClassIds; };