0

我需要你的帮助。

有没有办法在不使用弹出窗口的情况下控制先前授权的串行端口?(没有端口 = await navigator.serial.requestPort();

谢谢你,对不起我的英语,意大利语在这里说。

4

1 回答 1

0

我相信下面的 JS 代码应该适合你:

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

来源:https ://web.dev/serial/#open-port

于 2021-11-16T12:31:09.753 回答