SerialPort.close()

Secure context

This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The SerialPort.close() method of the SerialPort interface returns a Promise that resolves when the port closes.

Syntax

var promise = SerialPort.close();

Parameters

None.

Return value

A Promise.

Specifications

Specification Status Comment
Web Serial API
The definition of 'SerialPort.close()' in that specification.
Draft Initial definition.

Browser compatibility

No compatibility data found for api.SerialPort.close().
Check for problems with this page or contribute missing data to mdn/browser-compat-data.