Test if html5 geolocation permission already has been granted

后端 未结 3 677
时光取名叫无心
时光取名叫无心 2021-01-02 23:22

Does anyone know if there is a way to test if prior html5 geolocation permission has been granted?

I try to make a script that does not request the geolocation unles

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-02 23:55

    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.

提交回复
热议问题