Package-level declarations
Types
The Serial interface of the Web Serial API provides attributes and methods for finding and connecting to serial ports from a web page. Available only in secure contexts.
The SerialPort interface of the Web Serial API provides access to a serial port on the host device. Available only in secure contexts.
Properties
Functions
The SerialPort.close() method of the SerialPort interface returns a Promise that resolves when the port closes.
The SerialPort.forget() method of the SerialPort interface returns a Promise that resolves when access to the serial port is revoked.
The getPorts() method of the Serial interface returns a Promise that resolves with an array of SerialPort objects representing serial ports connected to the host which the origin has permission to access.
The SerialPort.getSignals() method of the SerialPort interface returns a Promise that resolves with an object containing the current state of the port's control signals.
The open() method of the SerialPort interface returns a Promise that resolves when the port is opened. By default the port is opened with 8 data bits, 1 stop bit and no parity checking. The baudRate parameter is required.
The Serial.requestPort() method of the Serial interface presents the user with a dialog asking them to select a serial device to connect to. It returns a Promise that resolves with an instance of SerialPort representing the device chosen by the user.
The setSignals() method of the SerialPort interface sets control signals on the port and returns a Promise that resolves when they are set.