In the source, I see you keep a reference to the writableStreamClosed promise. However, you don't await this promise nor is there any logic to close the writer, reader, and port. I also saw the reader.releaseLock line commented (I don't recall if there was a writer.releaseLock). Maybe there can be a Close button to exercise this logic, which would allow the user to reuse the serial port without necessarily having to close the browser tab?
In the source, I see you keep a reference to the writableStreamClosed promise. However, you don't await this promise nor is there any logic to close the writer, reader, and port. I also saw the reader.releaseLock line commented (I don't recall if there was a writer.releaseLock). Maybe there can be a Close button to exercise this logic, which would allow the user to reuse the serial port without necessarily having to close the browser tab?