Is it possible to create a custom user permission request dialog for HTML5 APIs (e.g geolocation or getUserMedia) so they look the same across all browsers?
Asked
Active
Viewed 1,514 times
2 Answers
3
Thankfully, no!
If you were able to create your own, you might phrase the question (and buttons) misleadingly. Just like you can't style the onbeforeunload
popup.
Anything that is outside your sandbox, and you're trying to get access to, has to be controlled by the browser UI. Otherwise it'll just be complete and utter mayhem.

Joseph Silber
- 214,931
- 59
- 362
- 292
-
2"Would you like to win a free iPad? YES | NO" – David Harkness May 02 '16 at 19:01
-
while I do understand why this can be a problem, is it really impossible? for example, I've seen some websites that have custom permission request dialog for cookies. are cookies permission any different than location? p.s. sorry to notify you from an ancient question – LongToeBoy May 13 '22 at 09:28
-
1@LongToeBoy - Browsers don't require permissions for Cookies. Any site can technically store cookies without asking for permissions. Those cookie permissions requests you see on many sites are due to a (relatively recent) law in the EU that mandates sites to ask permissions for cookies. So that's totally different. – Joseph Silber May 13 '22 at 15:14
0
are you talking about having one custom style of all api authentications, across multiple API's, most API's such as facebook, instagram, foursquare, google etc, have their own dialogs you have to use in order to auth, so I believe creating a custom one would be not possible, although I hate saying things aren't possible. But also in terms of HTML5 API's they cannot be customized

Jessie Frazelle
- 635
- 5
- 9