Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

331
Views
Web serial api , Port open without user gesture

In web serial api, I am able to open ports on button click. Is there any way to open port once the port is connected ? onconnect event does not open port, asking for user gesture...I need automatic open for mass production...

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As indicated in https://web.dev/serial/#open-port, requestPort() requires a user gesture such as touch or mouse click. However once you have a port, you can open() one on subsequent page load without any user gesture.

// Get all serial ports the user has previously granted the website access to.
const ports = await navigator.serial.getPorts();

// Assuming the first one is the one you want to open...
const port = ports[0];

// Open serial port without user gesture.
await port.open({ baudRate: 9600 });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!