我需要运行我的自定义协议两次,但第二次不起作用,我收到此错误(不允许启动“cutomProtocol”,因为需要用户手势。)我试图找到解决方案,但没有找到任何解决方案!
chrome、firefox 和 Edge 也有同样的问题。

我需要看到这个弹出窗口两次

window.location.href = 'my-protocol://${base64}';
和
customProtocolVerify(
`my-protocol://${base64}`,
() => {
// successCb: Callback function which gets called when custom protocol is found.
console.log('My protocol found and opened the file successfully..');
},
() => {
// failCb: Callback function which gets called when custom protocol not found.
console.log('My protocol not found.');
}
);
Run Code Online (Sandbox Code Playgroud)
我尝试了这两个但没有成功
澄清
我有一个自定义协议。
我的场景:
customProtocolVerify方法),并且如果找到协议,该方法就会启动我的问题:
步骤 3 不起作用,控制台上出现错误,显示“不允许启动...”,当然我看不到打开协议的弹出窗口。
我请求帮助以使第 3 步顺利进行