blob: 48d7960a578e1b73fbddc3d3bd19015627a3bdd5 [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 Serial : EventTarget {
attribute EventHandler onconnect;
attribute EventHandler ondisconnect;
[CallWith=ScriptState, RaisesException, MeasureAs=SerialGetPorts]
Promise<sequence<SerialPort>> getPorts();
[CallWith=ScriptState, RaisesException, MeasureAs=SerialRequestPort, Exposed=Window]
Promise<SerialPort> requestPort(optional SerialPortRequestOptions options);
};