拦截navigator.usb.RequestDevice对话框与木偶
是否可以通过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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 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?