// 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 [ ActiveScriptWrappable, 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 open(SerialOptions options); [CallWith=ScriptState, RaisesException] Promise getSignals(); [CallWith=ScriptState, RaisesException] Promise setSignals(SerialOutputSignals signals); [RaisesException, CallWith=ScriptState, MeasureAs=SerialPortClose] Promise close(); };