requestPort

inline suspend fun Serial.requestPort(): SerialPort(source)

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.

MDN Reference