Fat*_*tma 5 javascript browser custom-protocol gesture angular
我需要运行我的自定义协议两次,但第二次不起作用,我收到此错误(不允许启动“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 步顺利进行
小智 0
绕过此“错误”的唯一方法是通过显示 OK 警报或某种用户确认框来询问用户两次(或循环)。
我的解决方案:
OpenLinkInExternalApp(Link);
alerty.alert('', { title: '', okLabel: 'Open Link' }, function () {
OpenLinkInExternalApp(Link);
});
Run Code Online (Sandbox Code Playgroud)
上面的代码将打开外部应用程序,然后会弹出“确定”警报,单击“确定”后,我再次调用相同的代码。如果需要,可以循环执行此操作。
提示:现阶段我们引导用户使用分屏。例如,用户可以将您的网络应用程序停靠在左侧,将外部应用程序停靠在右侧。
警报框:我们使用 Alerty.js https://github.com/undead25/alerty#readme
| 归档时间: |
|
| 查看次数: |
9042 次 |
| 最近记录: |