blob: 6628cc5bc7ccb090ca08944ce34bcf55f147ed23 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://wicg.github.io/serial
[
Exposed(Window Serial,DedicatedWorker Serial),
SecureContext
] interface SerialPort {
[CallWith=ScriptState, RaisesException]
readonly attribute ReadableStream readable;
[CallWith=ScriptState, RaisesException]
readonly attribute WritableStream writable;
[CallWith=ScriptState, RaisesException, MeasureAs=SerialPortOpen]
Promise<void> open(SerialOptions options);
[CallWith=ScriptState, RaisesException]
Promise<SerialInputSignals> getSignals();
[CallWith=ScriptState, RaisesException]
Promise<void> setSignals(SerialOutputSignals signals);
[MeasureAs=SerialPortClose]
void close();
};