Skip to content

probe-web / @probe-web/serial / requestPort

Function: requestPort() ​

ts
function requestPort(opts?): Promise<SerialPortLike>;

Defined in: index.ts:101

Open the browser's port chooser (needs a user gesture) and resolve with the port the user picks. The chooser lists SERIAL_BRIDGE_FILTERS; any drops those filters. Rejects if WebSerial is missing or the user cancels.

Parameters ​

ParameterType
opts{ any?: boolean; }
opts.any?boolean

Returns ​

Promise<SerialPortLike>