最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

async await - Asking for contact permission for Android Chrome and others with a delay not working - Stack Overflow

programmeradmin1浏览0评论

I'm trying to ask for contact permission after some timeout delay through webpage from Android Chrome and others but it's not working- I tried with following attempts: setTimeout, await etc for the original code below which is without a delay.

onclick = async () => {
                 (async () => {
await navigator.contacts.select(["name"], {});
                 })();

What's the reason it's not working? I thought setTimeout() could not work since it's using async() but then await should do the work but that's not the case.

I tried with following attempts: setTimeout, await etc for the original code below which is without a delay.

发布评论

评论列表(0)

  1. 暂无评论