Web组件隐私模式下如何以回调方式异步获取隐私模式下指定源的地理位置权限状态。

Web组件隐私模式下如何以回调方式异步获取隐私模式下指定源的地理位置权限状态。

HarmonyOS
2024-08-06 18:39:18
浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
milchcow
Web({ src: 'www.example.com', controller: this.controller,
隐私模式开启
})

// getAccessibleGeolocation第三个参数表示隐私模式(true)或非隐私模式(false)下,以回调方式异步获取指定源的地理位置权限状态。
web_webview.GeolocationPermissions.getAccessibleGeolocation( "file:///", (error, result) => {
  if (error) {
    console.log('getAccessibleGeolocationAsync error: ' + JSON.stringify(error));
    return;
  }
  console.log('getAccessibleGeolocationAsync result: ' + result);
}, true);
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
分享
微博
QQ
微信
回复
2024-08-06 20:17:05
相关问题
如何清除Web隐私模式所有cookie。
1216浏览 • 1回复 待解决
HarmonyOS web使用隐私模式
1090浏览 • 1回复 待解决
如何获取当前地理位置
47浏览 • 0回复 待解决
HarmonyOS 登录组件点击隐私没有
500浏览 • 1回复 待解决
设置禁止截屏隐私模式
2310浏览 • 1回复 待解决
隐私模式设置后窗口是如何展示
2142浏览 • 1回复 待解决
stagemode 模式如何获取version信息?
2313浏览 • 0回复 待解决
MySQL 如何按照地理位置排序?
3308浏览 • 1回复 待解决
HarmonyOS 安全地理位置
752浏览 • 1回复 待解决
获取安全地理位置信息接口实现
950浏览 • 1回复 待解决