拦截navigator.usb.RequestDevice对话框与木偶

发布于 2025-02-08 18:08:45 字数 272 浏览 2 评论 0原文

是否可以通过navigator.usb.requestdevice在请求USB设备后拦截对话框?我尝试了page.on(“对话框”,dialog =>()来自puppeteer脚本和document.addeventlistener('dialog',()=> ...)

代码>从页面DOM , .sstatic.net/c89cs.png“ alt =“对话框”>

Is it possible to intercept the dialog created after requesting a usb device via navigator.usb.requestDevice? I tried page.on("dialog", dialog => () from the puppeteer script and document.addEventListener('dialog', () => ...) from the page DOM but none of those callbacks were invoked.

Dialog

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

今天是不可能的,但这是Chromium Project知道开发人员对此感兴趣的东西。

为了帮助优先考虑此功能,您能说出自动执行此对话框的用例吗?

This is not possible today but it is something the Chromium project is aware developers are interested in.

To help prioritize this feature, can you say what your use case for automating this dialog is?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文