有谁知道是否有办法测试是否已授予先前的 html5 地理定位权限?
Does anyone know if there is a way to test if prior html5 geolocation permission has been granted?
我尝试制作一个不请求地理位置的脚本,除非该页面已获得许可.不一定非得是 html5;其他框架也可以.
I try to make a script that does not request the geolocation unless the permission for the page has already been given. Does not nessicerily have to be html5; other frameworks are also ok.
根据Geolocation API Specification没有任何功能.甚至将其保存在浏览器首选项中的选项也不会推送到您的代码中.
According to the Geolocation API Specification there isn't any function for this. Even the option to save it in the browser preferences isn't pushed to your code.
如果它真的很重要并且你真的必须意识到这一点,你必须为每个常见的浏览器编写一个浏览器插件并要求用户安装它.但我不会怀疑.
If it's realy important and you realy have to beeing aware of this, you have to write a browser addon for every common browser and ask the user to install it. But i wouldn't doubt of it.
这篇关于测试是否已授予 html5 地理定位权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在 Angular 2/Typescript 中使用 IScrollUse IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
Anime.js 在 Ionic 3 项目中不起作用anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 项目中不起作用)
Ionic 3 - 使用异步数据更新 ObservableIonic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用异步数据更新 Observable)
Angular 2:在本地 .json 文件中找不到文件Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
在 Ionic 2 中,如何创建使用 Ionic 组件的自定义指In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何创建使用 Ionic 组件的自定义指令?)
将 ViewChild 用于动态元素 - Angular 2 &离子2Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(将 ViewChild 用于动态元素 - Angular 2 amp;离子2)